• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

difference between AbstractFormController & SimpleFormController

 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
That's a very big dog. I think I want to go home now and hug this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic