Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Command Object in MultiActionController

 
sandeep lokhande
Ranch Hand
Posts: 120
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Frank Truong
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Frank

P.S. Command object can be passed as 4th parameter as well!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic