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 and
processFormSubmission : A form view and a
success view can be configured declaratively.
Call to processFormSubmission which inspects
the Errors object to see if
any errors have occurred during binding and validation.
If errors occured, the controller will return the configured formView,
showing the form again (possibly rendering according error messages).
If isFormChangeRequest is overridden and returns
true for the given request, the controller will return the formView too.
In that case, the controller will also suppress validation. Before returning the formView,
the controller will invoke onFormChange(HttpServletRequest, HttpServletResponse, Object, BindException) , giving sub-classes a chance
to make modification to the command object.
This is intended for requests that change the structure of the form,
which should not cause validation and show the form in any case.
If no errors occurred, the controller will call
onSubmit
using all parameters, which in case of the default implementation delegates to
onSubmit with just the command object.
The default implementation of the latter method will return the configured
successView. Consider implementing doSubmitAction(Object) doSubmitAction
for simply performing a submit action and rendering the success view.
The submit behavior can be customized by overriding one of the
onSubmit methods. Submit actions can also perform
custom validation if necessary (typically database-driven checks), calling
showForm
in case of validation errors to show the form view again.
Indicates what view to use when the user asks for a new form
or when validation errors have occurred on form submission.
successView
null
Indicates what view to use when successful form submissions have
occurred. Such a success view could e.g. display a submission summary.
More sophisticated actions can be implemented by overriding one of
the onSubmit() methods.
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 and processFormSubmission : A form view and a success view can be configured declaratively.
Workflow (in addition to the superclass):
successView. Consider implementing doSubmitAction(Object) doSubmitAction for simply performing a submit action and rendering the success view.The submit behavior can be customized by overriding one of the onSubmit methods. Submit actions can also perform custom validation if necessary (typically database-driven checks), calling showForm in case of validation errors to show the form view again.
Exposed configuration properties (and those defined by superclass):