struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mounir Benzid>
Subject paramsPrepareParamsStack-prepare-method problem
Date Wed, 14 Mar 2012 19:09:21 GMT

My  problem is the id  is always null.

First I thought it could be b/c of the way the defaultStack is set up so 
I switched to paramsPrepareParamsStack, yet the problem still remains.

Any ideas on how to obtain the id from the request?


public class PersonCRUDAction  implements Preparable {

     private Long id;

     public void execute() {
     ...  /*  crud the person   */

     public Long getId() { return id;}
     public void setId(Long id) {}

public  void prepare() throws Exception {

         Person peron;
         if (id!=null)
             person = personManager.loadById(id);
             throw new NullArgumentException("id");


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message