wood burning stoves 2.0*
The moose likes Spring and the fly likes difference between AbstractFormController & SimpleFormController Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "difference between AbstractFormController & SimpleFormController " Watch "difference between AbstractFormController & SimpleFormController " New topic
Author

difference between AbstractFormController & SimpleFormController

Rahul Ba
Ranch Hand

Joined: Oct 01, 2008
Posts: 205

Hi All,

I am new to the spring Mvc and tryign to learn different types of controller.
What is the difference between AbstractFormController & SimpleFormController ?

Regards,
Rahul
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

It's explained here. Note that SimpleFormController is a concrete implementation of the AbstractFormController.


Concrete FormController implementation that provides configurable form and success views, and an onSubmit chain for convenient overriding. Automatically resubmits to the form view in case of validation errors, and renders the success view in case of a valid submission.

The workflow of this Controller does not differ much from the one described in the AbstractFormController. The difference is that you do not need to implement showForm, processFormSubmission, and renderFormSubmission: A form view and a success view can be configured declaratively.


[My Blog]
All roads lead to JavaRanch
Costi Ciudatu
Ranch Hand

Joined: Oct 24, 2006
Posts: 74
Are you sure you're not looking for AbstractWizardFormController vs. SimpleFormController ?
AbstractFormController is the support class provided by the framework for form controllers in general.
Simple is the implementation for the trivial case: a form submitted in one step -- it has a form view and a success view. The controller selects the view based on the request method: GET or POST (well, it's actually a lot more than this but you'll find that in the Javadoc).
AbstractWizardFormController on the other hand allows creating a web wizard by populating the command object in several steps (the classic Next, Next... Finish).
But you should be aware that in Spring 3.0 all the *FormControllers have been deprecated in favor of annotated controllers.
 
 
subject: difference between AbstractFormController & SimpleFormController
 
Similar Threads
Simple Form Controller, AbstractFormController, MultiActionController
What is the difference between formBackingObject() and referenceData()?
How dispatcher-servlet.xml works
how to set getting input from user
Spring MVC: What is the different between doSubmitAction(Object) and onSubmit(Object)