Java Doc for AbstractWizardFormController.java in  » J2EE » spring-framework-2.0.6 » org » springframework » web » portlet » mvc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.0.6 » org.springframework.web.portlet.mvc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.web.portlet.mvc.AbstractController
   org.springframework.web.portlet.mvc.BaseCommandController
      org.springframework.web.portlet.mvc.AbstractFormController
         org.springframework.web.portlet.mvc.AbstractWizardFormController

AbstractWizardFormController
abstract public class AbstractWizardFormController extends AbstractFormController (Code)
Form controller for typical wizard-style workflows.

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: trying to leave the wizard successfully, i.e. performing its final action, and thus needing a valid state;
  • cancel: leaving the wizard without performing its final action, and thus without regard to the validity of its current state;
  • page change: showing another wizard page, e.g. the next or previous one, with regard to "dirty back" and "dirty forward".

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, to properly handle usage of the back button in a browser: In this case, a submission always contains 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.
author:
   Juergen Hoeller
author:
   John A. Lewis
since:
   2.0
See Also:   AbstractWizardFormController.setPages
See Also:   AbstractWizardFormController.validatePage
See Also:   AbstractWizardFormController.processFinish
See Also:   AbstractWizardFormController.processCancel



Field Summary
final public static  StringPARAM_CANCEL
     Parameter triggering the cancel action.
final public static  StringPARAM_FINISH
     Parameter triggering the finish action.
final public static  StringPARAM_PAGE
     Parameter specifying the current page as value.
final public static  StringPARAM_TARGET
     Parameter specifying the target page, appending the page number to the name.

Constructor Summary
public  AbstractWizardFormController()
     Create a new AbstractWizardFormController.

Method Summary
protected  intgetCurrentPage(PortletRequest request)
     Return the current page number.
protected  intgetInitialPage(PortletRequest request, Object command)
     Return the initial page of the wizard, i.e.
protected  intgetInitialPage(PortletRequest request)
     Return the initial page of the wizard, i.e.
final public  StringgetPageAttribute()
     Return the name of the page attribute in the model.
final protected  intgetPageCount()
     Return the number of wizard pages.
protected  intgetPageCount(PortletRequest request, Object command)
     Return the page count for this wizard form controller.
protected  StringgetPageSessionAttributeName(PortletRequest request)
     Return the name of the PortletSession attribute that holds the page object for this wizard form controller.
protected  StringgetPageSessionAttributeName()
     Return the name of the PortletSession attribute that holds the page object for this wizard form controller.

Default is an internal name, of no relevance to applications, as the form session attribute is not usually accessed directly.

final public  String[]getPages()
     Return the wizard pages, i.e.
protected  intgetTargetPage(PortletRequest request, Object command, Errors errors, int currentPage)
     Return the target page specified in the request.
protected  intgetTargetPage(PortletRequest request, int currentPage)
     Return the target page specified in the request.

Default implementation examines "_target" parameter (e.g.

protected  StringgetViewName(PortletRequest request, Object command, int page)
     Return the name of the view for the specified page of this wizard form controller.
protected  voidhandleInvalidSubmit(ActionRequest request, ActionResponse response)
     Handle an invalid submit request, e.g.
final public  booleanisAllowDirtyBack()
     Return whether "dirty back" is allowed.
final public  booleanisAllowDirtyForward()
     Return whether "dirty forward" is allowed.
protected  booleanisCancelRequest(PortletRequest request)
     Determine whether the incoming request is a request to cancel the processing of the current form.

By default, this method returns true if a parameter matching the "_cancel" key is present in the request, otherwise it returns false.

protected  booleanisFinishRequest(PortletRequest request)
     Determine whether the incoming request is a request to finish the processing of the current form.

By default, this method returns true if a parameter matching the "_finish" key is present in the request, otherwise it returns false.

protected  booleanisFormSubmission(PortletRequest request)
     Consider an explicit finish or cancel request as a form submission too.
final protected  voidonBindAndValidate(PortletRequest request, Object command, BindException errors)
     Calls page-specific onBindAndValidate method.
protected  voidonBindAndValidate(PortletRequest request, Object command, BindException errors, int page)
     Callback for custom post-processing in terms of binding and validation.
protected  voidpostProcessPage(ActionRequest request, Object command, Errors errors, int page)
     Post-process the given page after binding and validation, potentially updating its command object.
protected  voidprocessCancel(ActionRequest request, ActionResponse response, Object command, BindException errors)
     Template method for the action phase of the cancel action of this wizard.

Default implementation throws a PortletException, saying that a cancel action request is not supported by this controller.

protected  voidprocessFinish(ActionRequest request, ActionResponse response, Object command, BindException errors)
     Template method for the action phase of the finish action of this wizard.

Default implementation throws a PortletException, saying that a finish action request is not supported by this controller.

final protected  voidprocessFormSubmission(ActionRequest request, ActionResponse response, Object command, BindException errors)
     Apply wizard workflow: finish, cancel, page change.
final protected  MapreferenceData(PortletRequest request, Object command, Errors errors)
     Calls page-specific referenceData method.
protected  MapreferenceData(PortletRequest request, Object command, Errors errors, int page)
     Create a reference data map for the given request, consisting of bean name/bean instance pairs as expected by ModelAndView.
protected  MapreferenceData(PortletRequest request, int page)
     Create a reference data map for the given request, consisting of bean name/bean instance pairs as expected by ModelAndView.
protected  ModelAndViewrenderCancel(RenderRequest request, RenderResponse response, Object command, BindException errors)
     Template method for the render phase of the cancel action of this wizard.

Default implementation throws a PortletException, saying that a cancel render request is not supported by this controller.

protected  ModelAndViewrenderFinish(RenderRequest request, RenderResponse response, Object command, BindException errors)
     Template method for the render phase of the finish action of this wizard.

Default implementation throws a PortletException, saying that a finish render request is not supported by this controller.

final protected  ModelAndViewrenderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors)
     Apply wizard workflow: finish, cancel, page change.
protected  ModelAndViewrenderInvalidSubmit(RenderRequest request, RenderResponse response)
     Handle an invalid submit request, e.g.
final public  voidsetAllowDirtyBack(boolean allowDirtyBack)
     Set if "dirty back" is allowed, i.e.
final public  voidsetAllowDirtyForward(boolean allowDirtyForward)
     Set if "dirty forward" is allowed, i.e.
protected  voidsetCancelRenderParameter(ActionRequest request, ActionResponse response)
     Pass the the parameter that indicates a cancel request forward to the render phase.
protected  voidsetFinishRenderParameter(ActionRequest request, ActionResponse response)
     Pass the the parameter that indicates a finish request forward to the render phase.
final public  voidsetPageAttribute(String pageAttribute)
     Set the name of the page attribute in the model, containing an Integer with the current page number.
protected  voidsetPageRenderParameter(ActionResponse response, int page)
     Pass the page number to the render phase by setting a render parameter.
final public  voidsetPages(String[] pages)
     Set the wizard pages, i.e.
protected  voidsetTargetRenderParameter(ActionRequest request, ActionResponse response)
     Pass the the parameter that indicates the target page of the request forward to the render phase.
final protected  ModelAndViewshowForm(RenderRequest request, RenderResponse response, BindException errors)
     Show first page as form view.
final protected  ModelAndViewshowPage(RenderRequest request, BindException errors, int page)
     Prepare the form model and view, including reference and error data, for the given page.
protected  voidvalidatePage(Object command, Errors errors, int page, boolean finish)
     Template method for custom validation logic for individual pages. Default implementation calls 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.

protected  voidvalidatePage(Object command, Errors errors, int page)
     Template method for custom validation logic for individual pages.

Field Detail
PARAM_CANCEL
final public static String PARAM_CANCEL(Code)
Parameter triggering the cancel action. Can be called from any wizard page!



PARAM_FINISH
final public static String PARAM_FINISH(Code)
Parameter triggering the finish action. Can be called from any wizard page!



PARAM_PAGE
final public static String PARAM_PAGE(Code)
Parameter specifying the current page as value. Not necessary on form pages, but allows to properly handle usage of the back button.
See Also:   AbstractWizardFormController.setPageAttribute



PARAM_TARGET
final public static String PARAM_TARGET(Code)
Parameter specifying the target page, appending the page number to the name.




Constructor Detail
AbstractWizardFormController
public AbstractWizardFormController()(Code)
Create a new AbstractWizardFormController.

"sessionForm" is automatically turned on, "validateOnBinding" turned off, and "cacheSeconds" set to 0 by the base class (-> no caching for all form controllers).





Method Detail
getCurrentPage
protected int getCurrentPage(PortletRequest request)(Code)
Return the current page number. Used by processFormSubmission.

The default implementation checks the page session attribute. Subclasses can override this for customized page determination.
See Also:   AbstractWizardFormController.processFormSubmission
See Also:   AbstractWizardFormController.getPageSessionAttributeName




getInitialPage
protected int getInitialPage(PortletRequest request, Object command)(Code)
Return the initial page of the wizard, i.e. the page shown at wizard startup. Default implementation delegates to getInitialPage(PortletRequest).
Parameters:
  request - current portlet request
Parameters:
  command - the command object as returned by formBackingObject the initial page number
See Also:   AbstractWizardFormController.getInitialPage(PortletRequest)
See Also:   AbstractWizardFormController.formBackingObject



getInitialPage
protected int getInitialPage(PortletRequest request)(Code)
Return the initial page of the wizard, i.e. the page shown at wizard startup. Default implementation returns 0 for first page.
Parameters:
  request - current portlet request the initial page number



getPageAttribute
final public String getPageAttribute()(Code)
Return the name of the page attribute in the model.



getPageCount
final protected int getPageCount()(Code)
Return the number of wizard pages. Useful to check whether the last page has been reached.

Note that a concrete wizard form controller might override getPageCount(PortletRequest, Object) to determine the page count dynamically.
See Also:   AbstractWizardFormController.getPageCount(PortletRequest,Object)




getPageCount
protected int getPageCount(PortletRequest request, Object command)(Code)
Return the page count for this wizard form controller. Default implementation delegates to getPageCount().

Can be overridden to dynamically adapt the page count.
Parameters:
  request - current portlet request
Parameters:
  command - the command object as returned by formBackingObject the current page count
See Also:   AbstractWizardFormController.getPageCount




getPageSessionAttributeName
protected String getPageSessionAttributeName(PortletRequest request)(Code)
Return the name of the PortletSession attribute that holds the page object for this wizard form controller.

Default implementation delegates to the getPageSessionAttributeName version without arguments.
Parameters:
  request - current portlet request the name of the form session attribute, or null if not in session form mode
See Also:   AbstractWizardFormController.getPageSessionAttributeName
See Also:   AbstractWizardFormController.getFormSessionAttributeName
See Also:   javax.portlet.PortletSession.getAttribute




getPageSessionAttributeName
protected String getPageSessionAttributeName()(Code)
Return the name of the PortletSession attribute that holds the page object for this wizard form controller.

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. the name of the page session attribute
See Also:   AbstractWizardFormController.getFormSessionAttributeName
See Also:   javax.portlet.PortletSession.getAttribute




getPages
final public String[] getPages()(Code)
Return the wizard pages, i.e. the view names for the pages. The array index corresponds to the page number.

Note that a concrete wizard form controller might override getViewName(PortletRequest, Object, int) to determine the view name for each page dynamically.
See Also:   AbstractWizardFormController.getViewName(PortletRequest,Object,int)




getTargetPage
protected int getTargetPage(PortletRequest request, Object command, Errors errors, int currentPage)(Code)
Return the target page specified in the request.

Default implementation delegates to getTargetPage(PortletRequest, int). Subclasses can override this for customized target page determination.
Parameters:
  request - current portlet request
Parameters:
  command - form object with request parameters bound onto it
Parameters:
  errors - validation errors holder
Parameters:
  currentPage - the current page, to be returned as fallbackif no target page specified the page specified in the request, or current page if not found
See Also:   AbstractWizardFormController.getTargetPage(PortletRequest,int)




getTargetPage
protected int getTargetPage(PortletRequest request, int currentPage)(Code)
Return the target page specified in the request.

Default implementation examines "_target" parameter (e.g. "_target1"). Subclasses can override this for customized target page determination.
Parameters:
  request - current portlet request
Parameters:
  currentPage - the current page, to be returned as fallbackif no target page specified the page specified in the request, or current page if not found
See Also:   AbstractWizardFormController.PARAM_TARGET




getViewName
protected String getViewName(PortletRequest request, Object command, int page)(Code)
Return the name of the view for the specified page of this wizard form controller. 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.
Parameters:
  request - current portlet request
Parameters:
  command - the command object as returned by formBackingObject the current page count
See Also:   AbstractWizardFormController.getPageCount




handleInvalidSubmit
protected void handleInvalidSubmit(ActionRequest request, ActionResponse response) throws Exception(Code)
Handle an invalid submit request, e.g. when in session form mode but no form object was found in the session (like in case of an invalid resubmit by the browser).

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.
Parameters:
  request - current portlet action request
Parameters:
  response - current portlet action response
throws:
  Exception - in case of errors
See Also:   AbstractWizardFormController.renderInvalidSubmit




isAllowDirtyBack
final public boolean isAllowDirtyBack()(Code)
Return whether "dirty back" is allowed.



isAllowDirtyForward
final public boolean isAllowDirtyForward()(Code)
Return whether "dirty forward" is allowed.



isCancelRequest
protected boolean isCancelRequest(PortletRequest request)(Code)
Determine whether the incoming request is a request to cancel the processing of the current form.

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").
Parameters:
  request - current portlet request
See Also:   AbstractWizardFormController.PARAM_CANCEL




isFinishRequest
protected boolean isFinishRequest(PortletRequest request)(Code)
Determine whether the incoming request is a request to finish the processing of the current form.

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").
Parameters:
  request - current portlet request
See Also:   AbstractWizardFormController.PARAM_FINISH




isFormSubmission
protected boolean isFormSubmission(PortletRequest request)(Code)
Consider an explicit finish or cancel request as a form submission too.
See Also:   AbstractWizardFormController.isFinishRequest(PortletRequest)
See Also:   AbstractWizardFormController.isCancelRequest(PortletRequest)



onBindAndValidate
final protected void onBindAndValidate(PortletRequest request, Object command, BindException errors) throws Exception(Code)
Calls page-specific onBindAndValidate method.



onBindAndValidate
protected void onBindAndValidate(PortletRequest request, Object command, BindException errors, int page) throws Exception(Code)
Callback for custom post-processing in terms of binding and validation. Called on each submit, after standard binding but before page-specific validation of this wizard form controller.

Note: AbstractWizardFormController does not perform standard validation on binding but rather applies page-specific validation on processing the form submission.
Parameters:
  request - current portlet request
Parameters:
  command - bound command
Parameters:
  errors - Errors instance for additional custom validation
Parameters:
  page - current wizard page
throws:
  Exception - in case of invalid state or arguments
See Also:   AbstractWizardFormController.bindAndValidate
See Also:   AbstractWizardFormController.processFormSubmission
See Also:   org.springframework.validation.Errors




postProcessPage
protected void postProcessPage(ActionRequest request, Object command, Errors errors, int page) throws Exception(Code)
Post-process the given page after binding and validation, potentially updating its command object. The passed-in request might contain special parameters sent by the page.

Only invoked when displaying another page or the same page again, not when finishing or cancelling.
Parameters:
  request - current action request
Parameters:
  command - form object with request parameters bound onto it
Parameters:
  errors - validation errors holder
Parameters:
  page - number of page to post-process
throws:
  Exception - in case of invalid state or arguments




processCancel
protected void processCancel(ActionRequest request, ActionResponse response, Object command, BindException errors) throws Exception(Code)
Template method for the action phase of the cancel action of this wizard.

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.
Parameters:
  request - current portlet action request
Parameters:
  response - current portlet action response
Parameters:
  command - form object with the current wizard state
Parameters:
  errors - Errors instance containing errors
throws:
  Exception - in case of invalid state or arguments
See Also:   AbstractWizardFormController.renderCancel
See Also:   org.springframework.validation.Errors




processFinish
protected void processFinish(ActionRequest request, ActionResponse response, Object command, BindException errors) throws Exception(Code)
Template method for the action phase of the finish action of this wizard.

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.
Parameters:
  request - current portlet action request
Parameters:
  response - current portlet action response
Parameters:
  command - form object with the current wizard state
Parameters:
  errors - validation errors holder
throws:
  Exception - in case of invalid state or arguments
See Also:   AbstractWizardFormController.renderFinish
See Also:   org.springframework.validation.Errors




processFormSubmission
final protected void processFormSubmission(ActionRequest request, ActionResponse response, Object command, BindException errors) throws Exception(Code)
Apply wizard workflow: finish, cancel, page change.
See Also:   AbstractWizardFormController.renderFormSubmission



referenceData
final protected Map referenceData(PortletRequest request, Object command, Errors errors) throws Exception(Code)
Calls page-specific referenceData method.



referenceData
protected Map referenceData(PortletRequest request, Object command, Errors errors, int page) throws Exception(Code)
Create a reference data map for the given request, consisting of bean name/bean instance pairs as expected by ModelAndView.

Default implementation delegates to referenceData(HttpServletRequest, int). Subclasses can override this to set reference data used in the view.
Parameters:
  request - current portlet request
Parameters:
  command - form object with request parameters bound onto it
Parameters:
  errors - validation errors holder
Parameters:
  page - current wizard page a Map with reference data entries, or null if none
throws:
  Exception - in case of invalid state or arguments
See Also:   AbstractWizardFormController.referenceData(PortletRequest,int)
See Also:   org.springframework.web.portlet.ModelAndView




referenceData
protected Map referenceData(PortletRequest request, int page) throws Exception(Code)
Create a reference data map for the given request, consisting of bean name/bean instance pairs as expected by ModelAndView.

Default implementation returns null. Subclasses can override this to set reference data used in the view.
Parameters:
  request - current portlet request
Parameters:
  page - current wizard page a Map with reference data entries, or null if none
throws:
  Exception - in case of invalid state or arguments
See Also:   org.springframework.web.portlet.ModelAndView




renderCancel
protected ModelAndView renderCancel(RenderRequest request, RenderResponse response, Object command, BindException errors) throws Exception(Code)
Template method for the render phase of the cancel action of this wizard.

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.
Parameters:
  request - current portlet render request
Parameters:
  response - current portlet render response
Parameters:
  command - form object with the current wizard state
Parameters:
  errors - Errors instance containing errors the cancellation view
throws:
  Exception - in case of invalid state or arguments
See Also:   AbstractWizardFormController.processCancel
See Also:   org.springframework.validation.Errors
See Also:   org.springframework.validation.BindException.getModel




renderFinish
protected ModelAndView renderFinish(RenderRequest request, RenderResponse response, Object command, BindException errors) throws Exception(Code)
Template method for the render phase of the finish action of this wizard.

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.
Parameters:
  request - current portlet render request
Parameters:
  response - current portlet render response
Parameters:
  command - form object with the current wizard state
Parameters:
  errors - validation errors holder the finish view
throws:
  Exception - in case of invalid state or arguments
See Also:   AbstractWizardFormController.processFinish
See Also:   org.springframework.validation.Errors
See Also:   org.springframework.validation.BindException.getModel




renderFormSubmission
final protected ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors) throws Exception(Code)
Apply wizard workflow: finish, cancel, page change.
See Also:   AbstractWizardFormController.processFormSubmission



renderInvalidSubmit
protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response) throws Exception(Code)
Handle an invalid submit request, e.g. when in session form mode but no form object was found in the session (like in case of an invalid resubmit by the browser).

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.
Parameters:
  request - current portlet render request
Parameters:
  response - current portlet render response a prepared view, or null if handled directly
throws:
  Exception - in case of errors
See Also:   AbstractWizardFormController.showNewForm
See Also:   AbstractWizardFormController.setBindOnNewForm
See Also:   AbstractWizardFormController.handleInvalidSubmit




setAllowDirtyBack
final public void setAllowDirtyBack(boolean allowDirtyBack)(Code)
Set if "dirty back" is allowed, i.e. if moving to a former wizard page is allowed in case of validation errors for the current page.
Parameters:
  allowDirtyBack - if "dirty back" is allowed



setAllowDirtyForward
final public void setAllowDirtyForward(boolean allowDirtyForward)(Code)
Set if "dirty forward" is allowed, i.e. if moving to a later wizard page is allowed in case of validation errors for the current page.
Parameters:
  allowDirtyForward - if "dirty forward" is allowed



setCancelRenderParameter
protected void setCancelRenderParameter(ActionRequest request, ActionResponse response)(Code)
Pass the the parameter that indicates a cancel request forward to the render phase. If the isCancelRequest method was overridden, this may need to be overriden as well.
Parameters:
  request - the current action request
Parameters:
  response - the current action response
See Also:   AbstractWizardFormController.PARAM_CANCEL
See Also:   AbstractWizardFormController.isCancelRequest
See Also:   ActionResponse.setRenderParameter



setFinishRenderParameter
protected void setFinishRenderParameter(ActionRequest request, ActionResponse response)(Code)
Pass the the parameter that indicates a finish request forward to the render phase. If the isFinishRequest method was overridden, this may need to be overriden as well.
Parameters:
  request - the current action request
Parameters:
  response - the current action response
See Also:   AbstractWizardFormController.PARAM_FINISH
See Also:   AbstractWizardFormController.isFinishRequest
See Also:   ActionResponse.setRenderParameter



setPageAttribute
final public void setPageAttribute(String pageAttribute)(Code)
Set the name of the page attribute in the model, containing an Integer with the current page number.

This will be necessary for single views rendering multiple view pages. It also allows for specifying the optional "_page" parameter.
Parameters:
  pageAttribute - name of the page attribute
See Also:   AbstractWizardFormController.PARAM_PAGE




setPageRenderParameter
protected void setPageRenderParameter(ActionResponse response, int page)(Code)
Pass the page number to the render phase by setting a render parameter. This method may not be called when the action calls javax.portlet.ActionResponse.sendRedirect(String) .
Parameters:
  response - the current action response
Parameters:
  page - the page number
See Also:   ActionResponse.setRenderParameter



setPages
final public void setPages(String[] pages)(Code)
Set the wizard pages, i.e. the view names for the pages. The array index is interpreted as page number.
Parameters:
  pages - view names for the pages



setTargetRenderParameter
protected void setTargetRenderParameter(ActionRequest request, ActionResponse response)(Code)
Pass the the parameter that indicates the target page of the request forward to the render phase. If the getTargetPage method was overridden, this may need to be overriden as well.
Parameters:
  request - the current action request
Parameters:
  response - the current action response
See Also:   AbstractWizardFormController.PARAM_TARGET
See Also:   AbstractWizardFormController.getTargetPage(PortletRequest,int)
See Also:   AbstractWizardFormController.getTargetPage(PortletRequest,Object,Errors,int)
See Also:   ActionResponse.setRenderParameter



showForm
final protected ModelAndView showForm(RenderRequest request, RenderResponse response, BindException errors) throws Exception(Code)
Show first page as form view.



showPage
final protected ModelAndView showPage(RenderRequest request, BindException errors, int page) throws Exception(Code)
Prepare the form model and view, including reference and error data, for the given page. Can be used in processFinish implementations, to show the corresponding page in case of validation errors.
Parameters:
  request - current portlet render request
Parameters:
  errors - validation errors holder
Parameters:
  page - number of page to show the prepared form view
throws:
  Exception - in case of invalid state or arguments



validatePage
protected void validatePage(Object command, Errors errors, int page, boolean finish)(Code)
Template method for custom validation logic for individual pages. Default implementation calls 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!
Parameters:
  command - form object with the current wizard state
Parameters:
  errors - validation errors holder
Parameters:
  page - number of page to validate
Parameters:
  finish - whether this method is called during final revalidation on finish(else, it is called for validating the current page)
See Also:   AbstractWizardFormController.validatePage(Object,Errors,int)
See Also:   org.springframework.validation.Validator.validate




validatePage
protected void validatePage(Object command, Errors errors, int page)(Code)
Template method for custom validation logic for individual pages. Default implementation is empty.

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!
Parameters:
  command - form object with the current wizard state
Parameters:
  errors - validation errors holder
Parameters:
  page - number of page to validate
See Also:   org.springframework.validation.Validator.validate




Methods inherited from org.springframework.web.portlet.mvc.AbstractFormController
protected Object formBackingObject(PortletRequest request) throws Exception(Code)(Java Doc)
final protected Object getCommand(PortletRequest request) throws Exception(Code)(Java Doc)
final protected BindException getErrorsForNewForm(RenderRequest request) throws Exception(Code)(Java Doc)
protected String getFormSessionAttributeName(PortletRequest request)(Code)(Java Doc)
protected String getFormSessionAttributeName()(Code)(Java Doc)
protected String getFormSubmitParameterName()(Code)(Java Doc)
protected String getInvalidSubmitParameterName()(Code)(Java Doc)
public String[] getRenderParameters()(Code)(Java Doc)
protected void handleActionRequestInternal(ActionRequest request, ActionResponse response) throws Exception(Code)(Java Doc)
protected void handleInvalidSubmit(ActionRequest request, ActionResponse response) throws Exception(Code)(Java Doc)
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) throws Exception(Code)(Java Doc)
final public boolean isBindOnNewForm()(Code)(Java Doc)
protected boolean isFormSubmission(PortletRequest request)(Code)(Java Doc)
protected boolean isInvalidSubmission(PortletRequest request)(Code)(Java Doc)
public boolean isRedirectAction()(Code)(Java Doc)
final public boolean isSessionForm()(Code)(Java Doc)
protected void onBindOnNewForm(RenderRequest request, Object command, BindException errors) throws Exception(Code)(Java Doc)
protected void onBindOnNewForm(RenderRequest request, Object command) throws Exception(Code)(Java Doc)
protected void passRenderParameters(ActionRequest request, ActionResponse response)(Code)(Java Doc)
abstract protected void processFormSubmission(ActionRequest request, ActionResponse response, Object command, BindException errors) throws Exception(Code)(Java Doc)
protected Map referenceData(PortletRequest request, Object command, Errors errors) throws Exception(Code)(Java Doc)
abstract protected ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors) throws Exception(Code)(Java Doc)
protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response) throws Exception(Code)(Java Doc)
final public void setBindOnNewForm(boolean bindOnNewForm)(Code)(Java Doc)
final protected void setFormSubmit(ActionResponse response)(Code)(Java Doc)
final protected void setInvalidSubmit(ActionResponse response)(Code)(Java Doc)
public void setRedirectAction(boolean redirectAction)(Code)(Java Doc)
public void setRenderParameters(String[] parameters)(Code)(Java Doc)
final public void setSessionForm(boolean sessionForm)(Code)(Java Doc)
abstract protected ModelAndView showForm(RenderRequest request, RenderResponse response, BindException errors) throws Exception(Code)(Java Doc)
final protected ModelAndView showForm(RenderRequest request, BindException errors, String viewName) throws Exception(Code)(Java Doc)
final protected ModelAndView showForm(RenderRequest request, BindException errors, String viewName, Map controlModel) throws Exception(Code)(Java Doc)
final protected ModelAndView showNewForm(RenderRequest request, RenderResponse response) throws Exception(Code)(Java Doc)

Fields inherited from org.springframework.web.portlet.mvc.BaseCommandController
final public static String DEFAULT_COMMAND_NAME(Code)(Java Doc)

Methods inherited from org.springframework.web.portlet.mvc.BaseCommandController
final protected PortletRequestDataBinder bindAndValidate(PortletRequest request, Object command) throws Exception(Code)(Java Doc)
final protected boolean checkCommand(Object command)(Code)(Java Doc)
protected PortletRequestDataBinder createBinder(PortletRequest request, Object command) throws Exception(Code)(Java Doc)
final protected Object createCommand() throws Exception(Code)(Java Doc)
final public BindingErrorProcessor getBindingErrorProcessor()(Code)(Java Doc)
protected Object getCommand(PortletRequest request) throws Exception(Code)(Java Doc)
final public Class getCommandClass()(Code)(Java Doc)
final public String getCommandName()(Code)(Java Doc)
final public MessageCodesResolver getMessageCodesResolver()(Code)(Java Doc)
final public PropertyEditorRegistrar[] getPropertyEditorRegistrars()(Code)(Java Doc)
final protected Object getRenderCommand(RenderRequest request) throws PortletException(Code)(Java Doc)
protected String getRenderCommandSessionAttributeName()(Code)(Java Doc)
final protected BindException getRenderErrors(RenderRequest request) throws PortletException(Code)(Java Doc)
protected String getRenderErrorsSessionAttributeName()(Code)(Java Doc)
final public Validator getValidator()(Code)(Java Doc)
final public Validator[] getValidators()(Code)(Java Doc)
protected void initApplicationContext()(Code)(Java Doc)
protected void initBinder(PortletRequest request, PortletRequestDataBinder binder) throws Exception(Code)(Java Doc)
final public boolean isValidateOnBinding()(Code)(Java Doc)
protected void onBind(PortletRequest request, Object command, BindException errors) throws Exception(Code)(Java Doc)
protected void onBind(PortletRequest request, Object command) throws Exception(Code)(Java Doc)
protected void onBindAndValidate(PortletRequest request, Object command, BindException errors) throws Exception(Code)(Java Doc)
final protected void prepareBinder(PortletRequestDataBinder binder)(Code)(Java Doc)
final public void setBindingErrorProcessor(BindingErrorProcessor bindingErrorProcessor)(Code)(Java Doc)
final public void setCommandClass(Class commandClass)(Code)(Java Doc)
final public void setCommandName(String commandName)(Code)(Java Doc)
final public void setMessageCodesResolver(MessageCodesResolver messageCodesResolver)(Code)(Java Doc)
final public void setPropertyEditorRegistrar(PropertyEditorRegistrar propertyEditorRegistrar)(Code)(Java Doc)
final public void setPropertyEditorRegistrars(PropertyEditorRegistrar[] propertyEditorRegistrars)(Code)(Java Doc)
final protected void setRenderCommandAndErrors(ActionRequest request, Object command, BindException errors) throws Exception(Code)(Java Doc)
final public void setValidateOnBinding(boolean validateOnBinding)(Code)(Java Doc)
final public void setValidator(Validator validator)(Code)(Java Doc)
final public void setValidators(Validator[] validators)(Code)(Java Doc)
protected boolean suppressBinding(PortletRequest request)(Code)(Java Doc)
protected boolean suppressValidation(PortletRequest request)(Code)(Java Doc)
protected boolean useDirectFieldAccess()(Code)(Java Doc)

Methods inherited from org.springframework.web.portlet.mvc.AbstractController
final public void handleActionRequest(ActionRequest request, ActionResponse response) throws Exception(Code)(Java Doc)
protected void handleActionRequestInternal(ActionRequest request, ActionResponse response) throws Exception(Code)(Java Doc)
final public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) throws Exception(Code)(Java Doc)
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) throws Exception(Code)(Java Doc)
public boolean isRenderWhenMinimized()(Code)(Java Doc)
final public boolean isSynchronizeOnSession()(Code)(Java Doc)
public void setRenderWhenMinimized(boolean renderWhenMinimized)(Code)(Java Doc)
final public void setSynchronizeOnSession(boolean synchronizeOnSession)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.