|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
org.springframework.web.servlet.mvc.BaseCommandController
org.springframework.web.servlet.mvc.AbstractFormController
org.springframework.web.servlet.mvc.SimpleFormController
net.sf.springlayout.web.controller.AbstractBaseFormController
net.sf.springlayout.web.controller.AbstractPanelFormController
public abstract class AbstractPanelFormController
Abstract base class for providing common methods to controllers grouped in a multipage / multi-controller configuration. Should be used as an alternative to the WizardFormController when a different controller is required for each page and Spring Layout validation and tags are to be used.
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
|
| Fields inherited from class net.sf.springlayout.web.controller.AbstractBaseFormController |
|---|
PERSIST_VAL_THROUGH_REDIRECT |
| Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
|---|
DEFAULT_COMMAND_NAME |
| Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
|---|
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_HEAD, METHOD_POST |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractPanelFormController()
|
|
| Method Summary | |
|---|---|
void |
addToStateMap(javax.servlet.http.HttpServletRequest request,
java.lang.Object key,
java.lang.Object value)
Simple method to quickly add a parameter to the state map. |
void |
afterPropertiesSet()
|
org.springframework.web.servlet.ModelAndView |
changePanel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
Used to change panels on a multi-panel controller after binding the current form data to the command object. |
PanelFormGroup |
getPanelFormGroup()
gets the panel form group |
java.lang.String |
getRedirectFormView()
|
protected org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Adds the commandName to the request using the WebConstants.COMMAND_NAME attribute which is required by
the layout:panel tag then calls super to return to normal controller
lifecycle. |
void |
initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
Overridden to increase the visibility. |
boolean |
isCurrentlyValidating(javax.servlet.http.HttpServletRequest request)
returns whether currently validating. |
protected boolean |
isValidateMode(javax.servlet.http.HttpServletRequest request)
|
protected void |
onBindAndValidate(javax.servlet.http.HttpServletRequest request,
java.lang.Object command,
org.springframework.validation.BindException errors)
Calls through to the PanelFormGroup validate method if
supplied before passing onto super... |
protected org.springframework.web.servlet.ModelAndView |
processFormSubmission(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
|
org.springframework.web.servlet.ModelAndView |
refresh(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
Refreshes the current page after binding fields to the model. |
protected void |
setCurrentlyValidating(javax.servlet.http.HttpServletRequest request,
boolean validating)
Sets a request attribute as to whether we're currently validating. |
void |
setForm(Form form)
Overrides the setting of forms and throws an error if set. |
void |
setPanelFormGroup(PanelFormGroup panelFormGroup)
Sets the panelFormGroup for this controller |
void |
setRedirectFormView(java.lang.String redirectFormView)
|
protected void |
setValidateMode(javax.servlet.http.HttpServletRequest request,
boolean validateMode)
|
protected org.springframework.web.servlet.ModelAndView |
showForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.validation.BindException errors)
Checks the session for errors and if present and in validation mode adds them to the current errors object and removes them from the session. |
protected boolean |
suppressValidation(javax.servlet.http.HttpServletRequest request)
Supresseses validation of requests if not in validate mode. |
| Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormController |
|---|
doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, onFormChange, onFormChange, onSubmit, onSubmit, referenceData, setFormView, setSuccessView, showForm |
| Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormController |
|---|
currentFormObject, formBackingObject, getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, handleInvalidSubmit, isBindOnNewForm, isFormSubmission, isSessionForm, onBindOnNewForm, onBindOnNewForm, setBindOnNewForm, setSessionForm, showForm, showForm, showNewForm |
| Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
|---|
bindAndValidate, checkCommand, createCommand, getBindingErrorProcessor, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, initApplicationContext, isValidateOnBinding, onBind, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, suppressBinding |
| Methods inherited from class org.springframework.web.servlet.mvc.AbstractController |
|---|
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession |
| Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
|---|
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader |
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
|---|
getServletContext, getTempDir, getWebApplicationContext, isContextRequired |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.springlayout.web.controller.FormController |
|---|
getCommandName |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public AbstractPanelFormController()
| Method Detail |
|---|
public void setPanelFormGroup(PanelFormGroup panelFormGroup)
panelFormGroup - public PanelFormGroup getPanelFormGroup()
public void setForm(Form form)
setForm in class AbstractBaseFormControllerform -
public org.springframework.web.servlet.ModelAndView changePanel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
throws java.lang.Exception
request - response - command - errors -
java.lang.Exceptionprotected boolean suppressValidation(javax.servlet.http.HttpServletRequest request)
suppressValidation in class org.springframework.web.servlet.mvc.SimpleFormControllerrequest - the current requestSimpleFormController.suppressValidation(javax.servlet.http.HttpServletRequest)
protected org.springframework.web.servlet.ModelAndView showForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.validation.BindException errors)
throws java.lang.Exception
showForm in class AbstractBaseFormControllerjava.lang.ExceptionSimpleFormController.showForm(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse,
org.springframework.validation.BindException)
protected org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
WebConstants.COMMAND_NAME attribute which is required by
the layout:panel tag then calls super to return to normal controller
lifecycle.
handleRequestInternal in class AbstractBaseFormControllerjava.lang.ExceptionAbstractController.handleRequestInternal(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
public org.springframework.web.servlet.ModelAndView refresh(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
throws java.lang.Exception
refresh in class AbstractBaseFormControllerrequest - response - command - errors -
java.lang.Exception
protected void onBindAndValidate(javax.servlet.http.HttpServletRequest request,
java.lang.Object command,
org.springframework.validation.BindException errors)
throws java.lang.Exception
PanelFormGroup validate method if
supplied before passing onto super...
onBindAndValidate in class AbstractBaseFormControllerjava.lang.ExceptionBaseCommandController.onBindAndValidate(javax.servlet.http.HttpServletRequest,
java.lang.Object, org.springframework.validation.BindException)public void setRedirectFormView(java.lang.String redirectFormView)
setRedirectFormView in class AbstractBaseFormControllerpublic java.lang.String getRedirectFormView()
getRedirectFormView in class AbstractBaseFormController
protected org.springframework.web.servlet.ModelAndView processFormSubmission(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
throws java.lang.Exception
processFormSubmission in class AbstractBaseFormControllerjava.lang.Exceptionprotected boolean isValidateMode(javax.servlet.http.HttpServletRequest request)
protected void setValidateMode(javax.servlet.http.HttpServletRequest request,
boolean validateMode)
protected void setCurrentlyValidating(javax.servlet.http.HttpServletRequest request,
boolean validating)
request - validating - public boolean isCurrentlyValidating(javax.servlet.http.HttpServletRequest request)
request -
public void addToStateMap(javax.servlet.http.HttpServletRequest request,
java.lang.Object key,
java.lang.Object value)
request - key - value -
public void initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
throws java.lang.Exception
initBinder in interface FormControllerinitBinder in class AbstractBaseFormControllerjava.lang.ExceptionBaseCommandController.initBinder(javax.servlet.http.HttpServletRequest,
org.springframework.web.bind.ServletRequestDataBinder)
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class AbstractBaseFormControllerjava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||