@Deprecated public abstract class AbstractWizardFormController extends AbstractFormController
In contrast to classic forms, wizards have more than one form view page. Therefore, there are various actions instead of one single submit action:
Finish and cancel actions can be triggered by request parameters, named PARAM_FINISH ("_finish") and PARAM_CANCEL ("_cancel"), ignoring parameter values to allow for HTML buttons. The target page for page changes can be specified by PARAM_TARGET, appending the page number to the parameter name (e.g. "_target1"). The action parameters are recognized when triggered by image buttons too (via "_finish.x", "_abort.x", or "_target1.x").
The current page number will be stored in the session. It can also be specified as request parameter PARAM_PAGE ("_page") in order to properly handle usage of the back button in a browser: In this case, a submission will always contain the correct page number, even if the user submitted from an old view.
The page can only be changed if it validates correctly, except if a "dirty back" or "dirty forward" is allowed. At finish, all pages get validated again to guarantee a consistent state.
Note that a validator's default validate method is not executed when using
this class! Rather, the validatePage
implementation should call
special validateXXX
methods that the validator needs to provide,
validating certain pieces of the object. These can be combined to validate
the elements of individual pages.
Note: Page numbering starts with 0, to be able to pass an array consisting of the corresponding view names to the "pages" bean property.
Parameters indicated with setPassRenderParameters
will be present
for each page. If there are render parameters you need in renderFinish
or renderCancel
, then you need to pass those forward from the
processFinish
or processCancel
methods, respectively.
setPages(java.lang.String[])
,
validatePage(java.lang.Object, org.springframework.validation.Errors, int, boolean)
,
processFinish(ActionRequest, ActionResponse, java.lang.Object, org.springframework.validation.BindException)
,
processCancel(ActionRequest, ActionResponse, java.lang.Object, org.springframework.validation.BindException)
Modifier and Type | Field and Description |
---|---|
private boolean |
allowDirtyBack
Deprecated.
|
private boolean |
allowDirtyForward
Deprecated.
|
private java.lang.String |
pageAttribute
Deprecated.
|
private java.lang.String[] |
pages
Deprecated.
|
static java.lang.String |
PARAM_CANCEL
Deprecated.
Parameter triggering the cancel action.
|
static java.lang.String |
PARAM_FINISH
Deprecated.
Parameter triggering the finish action.
|
static java.lang.String |
PARAM_PAGE
Deprecated.
Parameter specifying the current page as value.
|
static java.lang.String |
PARAM_TARGET
Deprecated.
Parameter specifying the target page,
appending the page number to the name.
|
DEFAULT_COMMAND_NAME
logger
Constructor and Description |
---|
AbstractWizardFormController()
Deprecated.
Create a new AbstractWizardFormController.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getCurrentPage(PortletRequest request)
Deprecated.
Return the current page number.
|
protected int |
getInitialPage(PortletRequest request)
Deprecated.
Return the initial page of the wizard, i.e.
|
protected int |
getInitialPage(PortletRequest request,
java.lang.Object command)
Deprecated.
Return the initial page of the wizard, i.e.
|
java.lang.String |
getPageAttribute()
Deprecated.
Return the name of the page attribute in the model.
|
protected int |
getPageCount()
Deprecated.
Return the number of wizard pages.
|
protected int |
getPageCount(PortletRequest request,
java.lang.Object command)
Deprecated.
Return the page count for this wizard form controller.
|
java.lang.String[] |
getPages()
Deprecated.
Return the wizard pages, i.e.
|
protected java.lang.String |
getPageSessionAttributeName()
Deprecated.
Return the name of the PortletSession attribute that holds the page object
for this wizard form controller.
|
protected java.lang.String |
getPageSessionAttributeName(PortletRequest request)
Deprecated.
Return the name of the PortletSession attribute that holds the page object
for this wizard form controller.
|
protected int |
getTargetPage(PortletRequest request,
int currentPage)
Deprecated.
Return the target page specified in the request.
|
protected int |
getTargetPage(PortletRequest request,
java.lang.Object command,
Errors errors,
int currentPage)
Deprecated.
Return the target page specified in the request.
|
protected java.lang.String |
getViewName(PortletRequest request,
java.lang.Object command,
int page)
Deprecated.
Return the name of the view for the specified page of this wizard form controller.
|
protected void |
handleInvalidSubmit(ActionRequest request,
ActionResponse response)
Deprecated.
Handle an invalid submit request, e.g.
|
boolean |
isAllowDirtyBack()
Deprecated.
Return whether "dirty back" is allowed.
|
boolean |
isAllowDirtyForward()
Deprecated.
Return whether "dirty forward" is allowed.
|
protected boolean |
isCancelRequest(PortletRequest request)
Deprecated.
Determine whether the incoming request is a request to cancel the
processing of the current form.
|
protected boolean |
isFinishRequest(PortletRequest request)
Deprecated.
Determine whether the incoming request is a request to finish the
processing of the current form.
|
protected boolean |
isFormSubmission(PortletRequest request)
Deprecated.
Consider an explicit finish or cancel request as a form submission too.
|
protected void |
onBindAndValidate(PortletRequest request,
java.lang.Object command,
BindException errors)
Deprecated.
Calls page-specific onBindAndValidate method.
|
protected void |
onBindAndValidate(PortletRequest request,
java.lang.Object command,
BindException errors,
int page)
Deprecated.
Callback for custom post-processing in terms of binding and validation.
|
protected void |
postProcessPage(ActionRequest request,
java.lang.Object command,
Errors errors,
int page)
Deprecated.
Post-process the given page after binding and validation, potentially
updating its command object.
|
protected void |
processCancel(ActionRequest request,
ActionResponse response,
java.lang.Object command,
BindException errors)
Deprecated.
Template method for the action phase of the cancel action of this wizard.
|
protected void |
processFinish(ActionRequest request,
ActionResponse response,
java.lang.Object command,
BindException errors)
Deprecated.
Template method for the action phase of the finish action of this wizard.
|
protected void |
processFormSubmission(ActionRequest request,
ActionResponse response,
java.lang.Object command,
BindException errors)
Deprecated.
Apply wizard workflow: finish, cancel, page change.
|
protected java.util.Map |
referenceData(PortletRequest request,
int page)
Deprecated.
Create a reference data map for the given request, consisting of
bean name/bean instance pairs as expected by ModelAndView.
|
protected java.util.Map |
referenceData(PortletRequest request,
java.lang.Object command,
Errors errors)
Deprecated.
Calls page-specific referenceData method.
|
protected java.util.Map |
referenceData(PortletRequest request,
java.lang.Object command,
Errors errors,
int page)
Deprecated.
Create a reference data map for the given request, consisting of
bean name/bean instance pairs as expected by ModelAndView.
|
protected ModelAndView |
renderCancel(RenderRequest request,
RenderResponse response,
java.lang.Object command,
BindException errors)
Deprecated.
Template method for the render phase of the cancel action of this wizard.
|
protected ModelAndView |
renderFinish(RenderRequest request,
RenderResponse response,
java.lang.Object command,
BindException errors)
Deprecated.
Template method for the render phase of the finish action of this wizard.
|
protected ModelAndView |
renderFormSubmission(RenderRequest request,
RenderResponse response,
java.lang.Object command,
BindException errors)
Deprecated.
Apply wizard workflow: finish, cancel, page change.
|
protected ModelAndView |
renderInvalidSubmit(RenderRequest request,
RenderResponse response)
Deprecated.
Handle an invalid submit request, e.g.
|
private ModelAndView |
renderValidatePagesAndFinish(RenderRequest request,
RenderResponse response,
java.lang.Object command,
BindException errors,
int currentPage)
Deprecated.
Validate all pages and process finish.
|
void |
setAllowDirtyBack(boolean allowDirtyBack)
Deprecated.
Set if "dirty back" is allowed, i.e.
|
void |
setAllowDirtyForward(boolean allowDirtyForward)
Deprecated.
Set if "dirty forward" is allowed, i.e.
|
protected void |
setCancelRenderParameter(ActionRequest request,
ActionResponse response)
Deprecated.
Pass the the parameter that indicates a cancel request forward to the
render phase.
|
protected void |
setFinishRenderParameter(ActionRequest request,
ActionResponse response)
Deprecated.
Pass the the parameter that indicates a finish request forward to the
render phase.
|
void |
setPageAttribute(java.lang.String pageAttribute)
Deprecated.
Set the name of the page attribute in the model, containing
an Integer with the current page number.
|
protected void |
setPageRenderParameter(ActionResponse response,
int page)
Deprecated.
Pass the page number to the render phase by setting a render parameter.
|
void |
setPages(java.lang.String[] pages)
Deprecated.
Set the wizard pages, i.e.
|
protected void |
setTargetRenderParameter(ActionRequest request,
ActionResponse response)
Deprecated.
Pass the the parameter that indicates the target page of the request
forward to the render phase.
|
protected ModelAndView |
showForm(RenderRequest request,
RenderResponse response,
BindException errors)
Deprecated.
Show the first page as form view.
|
protected ModelAndView |
showPage(RenderRequest request,
BindException errors,
int page)
Deprecated.
Prepare the form model and view, including reference and error data,
for the given page.
|
protected void |
validatePage(java.lang.Object command,
Errors errors,
int page)
Deprecated.
Template method for custom validation logic for individual pages.
|
protected void |
validatePage(java.lang.Object command,
Errors errors,
int page,
boolean finish)
Deprecated.
Template method for custom validation logic for individual pages.
|
private void |
validatePagesAndFinish(ActionRequest request,
ActionResponse response,
java.lang.Object command,
BindException errors,
int currentPage)
Deprecated.
Validate all pages and process finish.
|
formBackingObject, getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, getFormSubmitParameterName, getInvalidSubmitParameterName, getRenderParameters, handleActionRequestInternal, handleRenderRequestInternal, isBindOnNewForm, isInvalidSubmission, isRedirectAction, isSessionForm, onBindOnNewForm, onBindOnNewForm, passRenderParameters, setBindOnNewForm, setFormSubmit, setInvalidSubmit, setRedirectAction, setRenderParameters, setSessionForm, showForm, showForm, showNewForm
bindAndValidate, checkCommand, createBinder, createCommand, getBindingErrorProcessor, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getRenderCommand, getRenderCommandSessionAttributeName, getRenderErrors, getRenderErrorsSessionAttributeName, getValidator, getValidators, getWebBindingInitializer, initApplicationContext, initBinder, isValidateOnBinding, onBind, onBind, prepareBinder, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setRenderCommandAndErrors, setValidateOnBinding, setValidator, setValidators, setWebBindingInitializer, suppressBinding, suppressValidation, useDirectFieldAccess
handleActionRequest, handleRenderRequest, isRenderWhenMinimized, isSynchronizeOnSession, setRenderWhenMinimized, setSynchronizeOnSession
applyCacheSeconds, cacheForSeconds, check, checkAndPrepare, checkAndPrepare, getCacheSeconds, isRequireSession, preventCaching, setCacheSeconds, setRequireSession
getPortletContext, getTempDir, isContextRequired, setPortletContext
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
public static final java.lang.String PARAM_FINISH
public static final java.lang.String PARAM_CANCEL
public static final java.lang.String PARAM_TARGET
public static final java.lang.String PARAM_PAGE
private java.lang.String[] pages
private java.lang.String pageAttribute
private boolean allowDirtyBack
private boolean allowDirtyForward
public AbstractWizardFormController()
"sessionForm" is automatically turned on, "validateOnBinding" turned off, and "cacheSeconds" set to 0 by the base class (-> no caching for all form controllers).
public final void setPages(java.lang.String[] pages)
pages
- view names for the pagespublic final java.lang.String[] getPages()
Note that a concrete wizard form controller might override
getViewName(PortletRequest, Object, int)
to
determine the view name for each page dynamically.
protected final int getPageCount()
Note that a concrete wizard form controller might override
getPageCount(PortletRequest, Object)
to determine
the page count dynamically.
getPageCount(PortletRequest, Object)
public final void setPageAttribute(java.lang.String pageAttribute)
This will be necessary for single views rendering multiple view pages. It also allows for specifying the optional "_page" parameter.
pageAttribute
- name of the page attributePARAM_PAGE
public final java.lang.String getPageAttribute()
public final void setAllowDirtyBack(boolean allowDirtyBack)
allowDirtyBack
- if "dirty back" is allowedpublic final boolean isAllowDirtyBack()
public final void setAllowDirtyForward(boolean allowDirtyForward)
allowDirtyForward
- if "dirty forward" is allowedpublic final boolean isAllowDirtyForward()
protected final void onBindAndValidate(PortletRequest request, java.lang.Object command, BindException errors) throws java.lang.Exception
onBindAndValidate
in class BaseCommandController
request
- current portlet requestcommand
- the command object, still allowing for further bindingerrors
- validation errors holder, allowing for additional
custom validationjava.lang.Exception
- in case of invalid state or argumentsBaseCommandController.bindAndValidate(PortletRequest, java.lang.Object)
,
Errors
protected void onBindAndValidate(PortletRequest request, java.lang.Object command, BindException errors, int page) throws java.lang.Exception
Note: AbstractWizardFormController does not perform standard validation on binding but rather applies page-specific validation on processing the form submission.
request
- current portlet requestcommand
- bound commanderrors
- Errors instance for additional custom validationpage
- current wizard pagejava.lang.Exception
- in case of invalid state or argumentsBaseCommandController.bindAndValidate(PortletRequest, java.lang.Object)
,
processFormSubmission(ActionRequest, ActionResponse, java.lang.Object, org.springframework.validation.BindException)
,
Errors
protected boolean isFormSubmission(PortletRequest request)
isFormSubmission
in class AbstractFormController
request
- current requestisFinishRequest(PortletRequest)
,
isCancelRequest(PortletRequest)
protected final java.util.Map referenceData(PortletRequest request, java.lang.Object command, Errors errors) throws java.lang.Exception
referenceData
in class AbstractFormController
request
- current render requestcommand
- form object with request parameters bound onto iterrors
- validation errors holderjava.lang.Exception
- in case of invalid state or argumentsModelAndView
protected java.util.Map referenceData(PortletRequest request, java.lang.Object command, Errors errors, int page) throws java.lang.Exception
The default implementation delegates to referenceData(PortletRequest, int)
.
Subclasses can override this to set reference data used in the view.
request
- current portlet requestcommand
- form object with request parameters bound onto iterrors
- validation errors holderpage
- current wizard pagejava.lang.Exception
- in case of invalid state or argumentsreferenceData(PortletRequest, int)
,
ModelAndView
protected java.util.Map referenceData(PortletRequest request, int page) throws java.lang.Exception
The default implementation returns null
.
Subclasses can override this to set reference data used in the view.
request
- current portlet requestpage
- current wizard pagejava.lang.Exception
- in case of invalid state or argumentsModelAndView
protected ModelAndView showForm(RenderRequest request, RenderResponse response, BindException errors) throws java.lang.Exception
This can be overridden in subclasses, e.g. to prepare wizard-specific error views in case of an Exception.
showForm
in class AbstractFormController
request
- current render requestresponse
- current render responseerrors
- validation errors holderjava.lang.Exception
- in case of invalid state or argumentsAbstractFormController.showForm(RenderRequest, BindException, String)
,
Errors
,
BindException.getModel()
,
AbstractFormController.referenceData(PortletRequest, Object, Errors)
,
SimpleFormController.setFormView(java.lang.String)
protected final ModelAndView showPage(RenderRequest request, BindException errors, int page) throws java.lang.Exception
processFinish
implementations,
to show the corresponding page in case of validation errors.request
- current portlet render requesterrors
- validation errors holderpage
- number of page to showjava.lang.Exception
- in case of invalid state or argumentsprotected int getPageCount(PortletRequest request, java.lang.Object command)
The default implementation delegates to getPageCount()
.
Can be overridden to dynamically adapt the page count.
request
- current portlet requestcommand
- the command object as returned by formBackingObjectgetPageCount()
protected java.lang.String getViewName(PortletRequest request, java.lang.Object command, int page)
The default implementation takes the view name from the getPages()
array.
Can be overridden to dynamically switch the page view or to return view names
for dynamically defined pages.
request
- current portlet requestcommand
- the command object as returned by formBackingObject
getPageCount()
protected int getInitialPage(PortletRequest request, java.lang.Object command)
The default implementation delegates to getInitialPage(PortletRequest)
.
request
- current portlet requestcommand
- the command object as returned by formBackingObject
getInitialPage(PortletRequest)
,
AbstractFormController.formBackingObject(PortletRequest)
protected int getInitialPage(PortletRequest request)
The default implementation returns 0 for first page.
request
- current portlet requestprotected java.lang.String getPageSessionAttributeName(PortletRequest request)
The default implementation delegates to the getPageSessionAttributeName
version without arguments.
request
- current portlet requestgetPageSessionAttributeName(PortletRequest)
,
AbstractFormController.getFormSessionAttributeName(PortletRequest)
,
javax.portlet.PortletSession#getAttribute
protected java.lang.String getPageSessionAttributeName()
Default is an internal name, of no relevance to applications, as the form session attribute is not usually accessed directly. Can be overridden to use an application-specific attribute name, which allows other code to access the session attribute directly.
AbstractFormController.getFormSessionAttributeName(PortletRequest)
,
javax.portlet.PortletSession#getAttribute
protected void setPageRenderParameter(ActionResponse response, int page)
javax.portlet.ActionResponse#sendRedirect(String)
.response
- the current action responsepage
- the page numberActionResponse#setRenderParameter
protected void setTargetRenderParameter(ActionRequest request, ActionResponse response)
getTargetPage
method
was overridden, this may need to be overriden as well.request
- the current action requestresponse
- the current action responsePARAM_TARGET
,
getTargetPage(PortletRequest, int)
,
getTargetPage(PortletRequest, Object, Errors, int)
,
ActionResponse#setRenderParameter
protected void setFinishRenderParameter(ActionRequest request, ActionResponse response)
isFinishRequest
method
was overridden, this may need to be overriden as well.request
- the current action requestresponse
- the current action responsePARAM_FINISH
,
isFinishRequest(PortletRequest)
,
ActionResponse#setRenderParameter
protected void setCancelRenderParameter(ActionRequest request, ActionResponse response)
isCancelRequest
method
was overridden, this may need to be overriden as well.request
- the current action requestresponse
- the current action responsePARAM_CANCEL
,
isCancelRequest(PortletRequest)
,
ActionResponse#setRenderParameter
protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response) throws java.lang.Exception
The default implementation for wizard form controllers simply shows the initial page of a new wizard form. If you want to show some "invalid submit" message, you need to override this method.
renderInvalidSubmit
in class AbstractFormController
request
- current portlet render requestresponse
- current portlet render responsejava.lang.Exception
- in case of errorsAbstractFormController.showNewForm(RenderRequest, RenderResponse)
,
AbstractFormController.setBindOnNewForm(boolean)
,
handleInvalidSubmit(ActionRequest, ActionResponse)
protected void handleInvalidSubmit(ActionRequest request, ActionResponse response) throws java.lang.Exception
The default implementation for wizard form controllers simply shows the initial page of a new wizard form, so here in the action phase this method does nothing. If you want to take some action on an invalid submit, you need to override this method.
handleInvalidSubmit
in class AbstractFormController
request
- current portlet action requestresponse
- current portlet action responsejava.lang.Exception
- in case of errorsrenderInvalidSubmit(RenderRequest, RenderResponse)
protected final ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, java.lang.Object command, BindException errors) throws java.lang.Exception
renderFormSubmission
in class AbstractFormController
request
- current render requestresponse
- current render responsecommand
- form object with request parameters bound onto iterrors
- errors holderjava.lang.Exception
- in case of errorsprocessFormSubmission(ActionRequest, ActionResponse, java.lang.Object, org.springframework.validation.BindException)
protected final void processFormSubmission(ActionRequest request, ActionResponse response, java.lang.Object command, BindException errors) throws java.lang.Exception
processFormSubmission
in class AbstractFormController
request
- current action requestresponse
- current action responsecommand
- form object with request parameters bound onto iterrors
- errors holder (subclass can add errors if it wants to)java.lang.Exception
- in case of errorsrenderFormSubmission(RenderRequest, RenderResponse, java.lang.Object, org.springframework.validation.BindException)
protected int getCurrentPage(PortletRequest request)
processFormSubmission(ActionRequest, ActionResponse, java.lang.Object, org.springframework.validation.BindException)
.
The default implementation checks the page session attribute. Subclasses can override this for customized page determination.
request
- current portlet requestgetPageSessionAttributeName()
protected boolean isFinishRequest(PortletRequest request)
By default, this method returns true
if a parameter
matching the "_finish" key is present in the request, otherwise it
returns false
. Subclasses may override this method
to provide custom logic to detect a finish request.
The parameter is recognized both when sent as a plain parameter ("_finish") or when triggered by an image button ("_finish.x").
request
- current portlet requestPARAM_FINISH
protected boolean isCancelRequest(PortletRequest request)
By default, this method returns true
if a parameter
matching the "_cancel" key is present in the request, otherwise it
returns false
. Subclasses may override this method
to provide custom logic to detect a cancel request.
The parameter is recognized both when sent as a plain parameter ("_cancel") or when triggered by an image button ("_cancel.x").
request
- current portlet requestPARAM_CANCEL
protected int getTargetPage(PortletRequest request, java.lang.Object command, Errors errors, int currentPage)
The default implementation delegates to getTargetPage(PortletRequest, int)
.
Subclasses can override this for customized target page determination.
request
- current portlet requestcommand
- form object with request parameters bound onto iterrors
- validation errors holdercurrentPage
- the current page, to be returned as fallback
if no target page specifiedgetTargetPage(PortletRequest, int)
protected int getTargetPage(PortletRequest request, int currentPage)
The default implementation examines "_target" parameter (e.g. "_target1"). Subclasses can override this for customized target page determination.
request
- current portlet requestcurrentPage
- the current page, to be returned as fallback
if no target page specifiedPARAM_TARGET
private ModelAndView renderValidatePagesAndFinish(RenderRequest request, RenderResponse response, java.lang.Object command, BindException errors, int currentPage) throws java.lang.Exception
java.lang.Exception
validatePagesAndFinish(ActionRequest, ActionResponse, java.lang.Object, org.springframework.validation.BindException, int)
private void validatePagesAndFinish(ActionRequest request, ActionResponse response, java.lang.Object command, BindException errors, int currentPage) throws java.lang.Exception
java.lang.Exception
renderValidatePagesAndFinish(RenderRequest, RenderResponse, java.lang.Object, org.springframework.validation.BindException, int)
protected void validatePage(java.lang.Object command, Errors errors, int page, boolean finish)
validatePage(command, errors, page)
.
Implementations will typically call fine-granular validateXXX
methods of this instance's Validator, combining them to validation of the
corresponding pages. The Validator's default validate
method
will not be called by a wizard form controller!
command
- form object with the current wizard stateerrors
- validation errors holderpage
- number of page to validatefinish
- whether this method is called during final revalidation on finish
(else, it is called for validating the current page)validatePage(Object, Errors, int)
,
Validator.validate(java.lang.Object, org.springframework.validation.Errors)
protected void validatePage(java.lang.Object command, Errors errors, int page)
Implementations will typically call fine-granular validateXXX methods of this
instance's validator, combining them to validation of the corresponding pages.
The validator's default validate
method will not be called by a
wizard form controller!
command
- form object with the current wizard stateerrors
- validation errors holderpage
- number of page to validateValidator.validate(java.lang.Object, org.springframework.validation.Errors)
protected void postProcessPage(ActionRequest request, java.lang.Object command, Errors errors, int page) throws java.lang.Exception
Only invoked when displaying another page or the same page again, not when finishing or cancelling.
request
- current action requestcommand
- form object with request parameters bound onto iterrors
- validation errors holderpage
- number of page to post-processjava.lang.Exception
- in case of invalid state or argumentsprotected ModelAndView renderFinish(RenderRequest request, RenderResponse response, java.lang.Object command, BindException errors) throws java.lang.Exception
The default implementation throws a PortletException, saying that a finish render request is not supported by this controller. Thus, you do not need to implement this template method if you do not need to render after a finish.
Call errors.getModel()
to populate the ModelAndView model
with the command and the Errors instance, under the specified command name,
as expected by the "spring:bind" tag.
request
- current portlet render requestresponse
- current portlet render responsecommand
- form object with the current wizard stateerrors
- validation errors holderjava.lang.Exception
- in case of invalid state or argumentsprocessFinish(ActionRequest, ActionResponse, java.lang.Object, org.springframework.validation.BindException)
,
Errors
,
BindException.getModel()
protected void processFinish(ActionRequest request, ActionResponse response, java.lang.Object command, BindException errors) throws java.lang.Exception
The default implementation throws a PortletException, saying that a finish action request is not supported by this controller. You will almost certainly need to override this method.
request
- current portlet action requestresponse
- current portlet action responsecommand
- form object with the current wizard stateerrors
- validation errors holderjava.lang.Exception
- in case of invalid state or argumentsrenderFinish(RenderRequest, RenderResponse, java.lang.Object, org.springframework.validation.BindException)
,
Errors
protected ModelAndView renderCancel(RenderRequest request, RenderResponse response, java.lang.Object command, BindException errors) throws java.lang.Exception
The default implementation throws a PortletException, saying that a cancel render request is not supported by this controller. Thus, you do not need to implement this template method if you do not support a cancel operation.
Call errors.getModel()
to populate the ModelAndView model
with the command and the Errors instance, under the specified command name,
as expected by the "spring:bind" tag.
request
- current portlet render requestresponse
- current portlet render responsecommand
- form object with the current wizard stateerrors
- Errors instance containing errorsjava.lang.Exception
- in case of invalid state or argumentsprocessCancel(ActionRequest, ActionResponse, java.lang.Object, org.springframework.validation.BindException)
,
Errors
,
BindException.getModel()
protected void processCancel(ActionRequest request, ActionResponse response, java.lang.Object command, BindException errors) throws java.lang.Exception
The default implementation throws a PortletException, saying that a cancel action request is not supported by this controller. Thus, you do not need to implement this template method if you do not support a cancel operation.
request
- current portlet action requestresponse
- current portlet action responsecommand
- form object with the current wizard stateerrors
- Errors instance containing errorsjava.lang.Exception
- in case of invalid state or argumentsrenderCancel(RenderRequest, RenderResponse, java.lang.Object, org.springframework.validation.BindException)
,
Errors