Cheng Wei Lee wrote:
I know I can get the values of the request parameters in the action class
and then use them to instantiate an object. Read from the API for
ParameterAware interface, "One common use for this is to have the action
propagate parameters to internally instantiated data objects.". Does this
means that Struts 2 can do it for us if we implement some interfaces or use
some interceptors? That is, I don't need to create the object in my own
action class?


If your bean is available in a public property of your action, and has a no-arg constructor, Struts 2 will instantiate it and set properties on it.
Ensure you have a getter and setter for the bean in your action.

ParameterAware is rarely needed.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to