|
|||||||||||
| 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
uk.co.lakesidetech.spxforms.web.servlet.mvc.BaseSpXCommandController
uk.co.lakesidetech.spxforms.web.servlet.mvc.AbstractSpXFormsController
| Field Summary |
| Fields inherited from class uk.co.lakesidetech.spxforms.web.servlet.mvc.BaseSpXCommandController |
DEFAULT_COMMAND_NAME |
| Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_POST |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
logger |
| Constructor Summary | |
AbstractSpXFormsController()
|
|
| Method Summary | |
protected boolean |
checkXFormsCommandClass(java.lang.Object formModel)
|
protected abstract java.lang.Object |
formXFormsInstance(javax.servlet.http.HttpServletRequest request)
|
protected java.lang.Object |
getCommand(javax.servlet.http.HttpServletRequest request)
Retrieve a command object for the given request. |
protected java.lang.String |
getFormSessionAttributeName()
Return the name of the session attribute that holds the form object for this controller. |
protected java.lang.String |
getFormView()
Return the name of the view that should be used for form display. |
protected java.lang.String |
getSuccessView()
Return the name of the view that should be shown on successful submit. |
protected org.springframework.web.servlet.ModelAndView |
handleInvalidSubmit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
boolean |
isBindOnNewForm()
|
protected boolean |
isFormSubmission(javax.servlet.http.HttpServletRequest request)
Determine if the given request represents a form submission. |
boolean |
isSessionForm()
|
protected org.springframework.web.servlet.ModelAndView |
processXFormActions(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
|
protected org.springframework.web.servlet.ModelAndView |
processXFormSubmission(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
|
protected java.util.Map |
referenceData(javax.servlet.http.HttpServletRequest request,
java.lang.Object command,
org.springframework.validation.Errors errors)
Create a reference data map for the given request, consisting of bean name/bean instance pairs as expected by ModelAndView. |
void |
setBindOnNewForm(boolean bindOnNewForm)
|
void |
setFormView(java.lang.String formView)
Set the name of the view that should be used for form display. |
void |
setSessionForm(boolean sessionForm)
|
void |
setSuccessView(java.lang.String successView)
Set the name of the view that should be shown on successful submit. |
protected org.springframework.web.servlet.ModelAndView |
showForm(javax.servlet.http.HttpServletRequest request,
org.springframework.validation.BindException errors,
java.lang.String viewName)
Prepare model and view for the given form, including reference and errors. |
protected org.springframework.web.servlet.ModelAndView |
showForm(javax.servlet.http.HttpServletRequest request,
org.springframework.validation.BindException errors,
java.lang.String viewName,
java.util.Map controlModel)
Prepare model and view for the given form, including reference and errors, adding a controller-specific control model. |
protected org.springframework.web.servlet.ModelAndView |
showForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.validation.BindException errors)
This implementation shows the configured form view. |
protected org.springframework.web.servlet.ModelAndView |
showNewForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Show a new form. |
| Methods inherited from class uk.co.lakesidetech.spxforms.web.servlet.mvc.BaseSpXCommandController |
bindAndValidate, createBinder, createCommand, getCommandClass, getCommandName, getMessageCodesResolver, getValidator, getValidators, initApplicationContext, initBinder, isValidateOnBinding, onBind, onBind, onBindAndValidate, setCommandClass, setCommandName, setMessageCodesResolver, setValidateOnBinding, setValidator, setValidators, suppressValidation |
| 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 |
| Constructor Detail |
public AbstractSpXFormsController()
| Method Detail |
public final void setFormView(java.lang.String formView)
protected final java.lang.String getFormView()
public final void setSuccessView(java.lang.String successView)
protected final java.lang.String getSuccessView()
protected org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
java.lang.ExceptionAbstractController.handleRequestInternal(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
protected org.springframework.web.servlet.ModelAndView processXFormActions(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
throws java.lang.Exception
java.lang.Exceptionprotected boolean isFormSubmission(javax.servlet.http.HttpServletRequest request)
Default implementation treats a POST request as form submission. Note: If the form session attribute doesn't exist when using session form mode, the request is always treated as new form by handleRequestInternal.
Subclasses can override this to use a custom strategy, e.g. a specific request parameter (assumably a hidden field or submit button name).
request - current HTTP request
public boolean isSessionForm()
public void setSessionForm(boolean sessionForm)
sessionForm - The sessionForm to set.public boolean isBindOnNewForm()
public void setBindOnNewForm(boolean bindOnNewForm)
bindOnNewForm - The bindOnNewForm to set.protected final java.lang.String getFormSessionAttributeName()
protected final java.lang.Object getCommand(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
BaseSpXCommandControllerDefault implementation calls createCommand. Subclasses can override this.
getCommand in class BaseSpXCommandControllerrequest - current HTTP request
java.lang.ExceptionBaseSpXCommandController.createCommand()
protected org.springframework.web.servlet.ModelAndView handleInvalidSubmit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
java.lang.Exception
protected final org.springframework.web.servlet.ModelAndView showNewForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
request - current HTTP requestresponse - current HTTP response
java.lang.Exception - in case of an invalid new form objectprotected boolean checkXFormsCommandClass(java.lang.Object formModel)
formModel -
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
request - current HTTP requestresponse - current HTTP responseerrors - validation errors holder
java.lang.Exception - in case of invalid state or argumentsshowForm(HttpServletRequest, BindException, String),
SimpleFormController#setFormView,
setFormView(java.lang.String)
protected final org.springframework.web.servlet.ModelAndView showForm(javax.servlet.http.HttpServletRequest request,
org.springframework.validation.BindException errors,
java.lang.String viewName)
throws java.lang.Exception
request - current HTTP requesterrors - validation errors holderviewName - name of the form view
java.lang.Exception - in case of invalid state or arguments
protected final org.springframework.web.servlet.ModelAndView showForm(javax.servlet.http.HttpServletRequest request,
org.springframework.validation.BindException errors,
java.lang.String viewName,
java.util.Map controlModel)
throws java.lang.Exception
request - current HTTP requesterrors - validation errors holderviewName - name of the form viewcontrolModel - model map containing controller-specific control data
(e.g. current page in wizard-style controllers).
java.lang.Exception - in case of invalid state or arguments
protected java.util.Map referenceData(javax.servlet.http.HttpServletRequest request,
java.lang.Object command,
org.springframework.validation.Errors errors)
throws java.lang.Exception
Default implementation returns null. Subclasses can override this to set reference data used in the view.
request - current HTTP requestcommand - form object with request parameters bound onto iterrors - validation errors holder
java.lang.Exception - in case of invalid state or argumentsModelAndViewprotected abstract java.lang.Object formXFormsInstance(javax.servlet.http.HttpServletRequest request)
request -
protected org.springframework.web.servlet.ModelAndView processXFormSubmission(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
throws java.lang.Exception
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||