File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Command Object in MultiActionController Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Command Object in MultiActionController" Watch "Command Object in MultiActionController" New topic
Author

Command Object in MultiActionController

sandeep lokhande
Ranch Hand

Joined: Jan 25, 2010
Posts: 118

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,
Sandeep Lokhande.
Frank Truong
Ranch Hand

Joined: Nov 19, 2002
Posts: 39
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Command Object in MultiActionController
 
Similar Threads
How to pass form bean to a MultiActionController
org.springframework.web.servlet.DispatcherServlet noHandlerFound
Refre to form(command) object in MultiActionController
how to tell MultiActionController Command Object is Of type com.dss.ems.model.User
using spring multiaction controller