• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

difference between AbstractFormController & SimpleFormController

 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic