aspose file tools*
The moose likes Spring and the fly likes using spring multiaction controller Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "using spring multiaction controller" Watch "using spring multiaction controller" New topic
Author

using spring multiaction controller

Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
hi guys
i am trying to move from struts mvc to spring mvc. i was reading that you cant use a command object with MultiactionController. is that true.
i have a pretty basic use case of displaying user list, createing new user, editring user etc...
in struts we use RequestDispacthAction where we can target which method to call for each use case with actionForm mapped to your bean.
The same applies with MultiactionController in spring, but how to bind a command object.
Or i have to use SimpleFormController for form submissiion
any links or suggestions
please let me know
darniz
Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
any advice
Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
Any spring experts
or should i rephrase my question if its unclear
Rahul Ba
Ranch Hand

Joined: Oct 01, 2008
Posts: 203
Yes, Rashid...
Can you explain your question a bit more....I am also new to the Spring..but I will try to answer.

Rahul
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Just declare a parameter, Spring will bind a request to a command object automatically.
Read Javadoc for more details.

SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
Thanks kengKaj
I understand that if i am using a simple form controllerr then i can decalre a command object and cast it onSubmit() method.
But for multiaction controller i cant seem i cant set the command Name and commandClass value in spring file
hereis my controller and i am using method name resolver and its working fine to call a specific method in my controller class. i wanted to also add a command object to it but doesn't seem to work.


Thanks
darniz
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using spring multiaction controller
 
Similar Threads
Which Conroller Should Fit Better
How to pass form bean to a MultiActionController
Spring MVC multiaction form controller ?
Command Object in MultiActionController
org.springframework.web.servlet.DispatcherServlet noHandlerFound