I am new to spring,
i want to know whether Command Object is available in MultiactionController having some Method?
If yes then how can you use that?
Suggest me any study material that will explain this concept,
Thank you in advance.
Thanks and Regards,
posted 5 years ago
I have been struggling with MultiActionController object as well.
Here is my observation:
If I passed a session object as 3rd parameter, I got the session object without doing anything extra. If I passed a command object as 3rd parameter, I got a null object passed in. I agree. Because I haven't seen any where in Spring that tells MultiActionController about this command object yet. Then, I overrided the newCommandObject(Class) method to return a (new)copy of this command object, I got request parameters pushed into this object automatically by Spring.
Make sure the form input parameters match the attributes of command object. Just like ActionForm in Struts.
This is just my observation, again.
P.S. Command object can be passed as 4th parameter as well!