|
|||||||||
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.AbstractCommandController
@Deprecated public abstract class AbstractCommandController
Abstract base class for custom command controllers.
Autopopulates a command bean from the request. For command validation,
a validator (property inherited from BaseCommandController
) can be
used.
In most cases this command controller should not be used to handle form
submission, because functionality for forms is offered in more detail by the
AbstractFormController
and its
corresponding implementations.
Exposed configuration properties
(and those defined by superclass):
none (so only those available in superclass).
Workflow
(and that defined by superclass):
BaseCommandController.setCommandClass(java.lang.Class)
,
BaseCommandController.setCommandName(java.lang.String)
,
BaseCommandController.setValidator(org.springframework.validation.Validator)
Field Summary |
---|
Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
---|
DEFAULT_COMMAND_NAME |
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
METHOD_GET, METHOD_HEAD, METHOD_POST |
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
AbstractCommandController()
Deprecated. Create a new AbstractCommandController. |
|
AbstractCommandController(java.lang.Class commandClass)
Deprecated. Create a new AbstractCommandController. |
|
AbstractCommandController(java.lang.Class commandClass,
java.lang.String commandName)
Deprecated. Create a new AbstractCommandController. |
Method Summary | |
---|---|
protected abstract ModelAndView |
handle(HttpServletRequest request,
HttpServletResponse response,
java.lang.Object command,
BindException errors)
Deprecated. Template method for request handling, providing a populated and validated instance of the command class, and an Errors object containing binding and validation errors. |
protected ModelAndView |
handleRequestInternal(HttpServletRequest request,
HttpServletResponse response)
Deprecated. Template method. |
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, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader |
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
---|
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
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 AbstractCommandController()
public AbstractCommandController(java.lang.Class commandClass)
commandClass
- class of the command beanpublic AbstractCommandController(java.lang.Class commandClass, java.lang.String commandName)
commandClass
- class of the command beancommandName
- name of the command beanMethod Detail |
---|
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws java.lang.Exception
AbstractController
handleRequest
.
handleRequestInternal
in class AbstractController
java.lang.Exception
AbstractController.handleRequest(HttpServletRequest, HttpServletResponse)
protected abstract ModelAndView handle(HttpServletRequest request, HttpServletResponse response, java.lang.Object command, BindException errors) throws java.lang.Exception
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 HTTP requestresponse
- current HTTP responsecommand
- the populated command objecterrors
- validation errors holder
null
if handled directly
java.lang.Exception
Errors
,
BindException.getModel()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |