• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring MVC: What is the different between doSubmitAction(Object) and onSubmit(Object)

 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the different between method doSubmitAction(Object) and onSubmit(Object) of SimpleFormController?
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

did you check the javadoc, it's at http://static.springframework.org/spring/docs/2.0.x/api/index.html

Herman
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
doSubmitAction(Object command) is a simple submit callback for you to perform an action and then go to the success view with the given command. There is no need to worry about ModelAndView.

with onSubmit(Object command), you need to return ModelAndView, so it is more flexible. You could customise the success view if you wish, for example. You could also pass more objects to the model for your display (eg. jsp).
 
reply
    Bookmark Topic Watch Topic
  • New Topic