Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using spring multiaction controller

 
Darvesh Niz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any advice
 
Darvesh Niz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any spring experts
or should i rephrase my question if its unclear
 
Rahul Ba
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just declare a parameter, Spring will bind a request to a command object automatically.
Read Javadoc for more details.
 
Darvesh Niz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic