类 ParameterizableViewController
- java.lang.Object
- org.springframework.context.support.ApplicationObjectSupport
- org.springframework.web.portlet.context.PortletApplicationObjectSupport
- org.springframework.web.portlet.handler.PortletContentGenerator
- org.springframework.web.portlet.mvc.AbstractController
- org.springframework.web.portlet.mvc.ParameterizableViewController
- 所有已实现的接口:
Aware
,ApplicationContextAware
,PortletContextAware
,Controller
public class ParameterizableViewController extends AbstractController
Trivial controller that always returns a named view. The view can be configured using an exposed configuration property. This controller offers an alternative to sending a request straight to a view such as a JSP. The advantage here is that the client is not exposed to the concrete view technology but rather just to the controller URL; the concrete view will be determined by the ViewResolver.Workflow (and that defined by superclass):
- Render request is received by the controller
- call to
handleRenderRequestInternal
which just returns the view, named by the configuration propertyviewName
.
This controller does not handle action requests.
Exposed configuration properties (and those defined by superclass):
name default description viewName null the name of the view the viewResolver will use to forward to (if this property is not set, an exception will be thrown during initialization) - 从以下版本开始:
- 2.0
- 作者:
- John A. Lewis
字段概要
从类继承的字段 org.springframework.context.support.ApplicationObjectSupport
logger
构造器概要
构造器 构造器 说明 ParameterizableViewController()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getViewName()
Return the name of the view to delegate to.protected ModelAndView
handleRenderRequestInternal(RenderRequest request, RenderResponse response)
Return a ModelAndView object with the specified view name.protected void
initApplicationContext()
Subclasses can override this for custom initialization behavior.void
setViewName(String viewName)
Set the name of the view to delegate to.从类继承的方法 org.springframework.web.portlet.mvc.AbstractController
handleActionRequest, handleActionRequestInternal, handleRenderRequest, isRenderWhenMinimized, isSynchronizeOnSession, setRenderWhenMinimized, setSynchronizeOnSession
从类继承的方法 org.springframework.web.portlet.handler.PortletContentGenerator
applyCacheSeconds, cacheForSeconds, check, checkAndPrepare, checkAndPrepare, getCacheSeconds, isRequireSession, preventCaching, setCacheSeconds, setRequireSession
从类继承的方法 org.springframework.web.portlet.context.PortletApplicationObjectSupport
getPortletContext, getTempDir, isContextRequired, setPortletContext
从类继承的方法 org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
构造器详细资料
ParameterizableViewController
public ParameterizableViewController()
方法详细资料
setViewName
public void setViewName(String viewName)
Set the name of the view to delegate to.
getViewName
public String getViewName()
Return the name of the view to delegate to.
initApplicationContext
protected void initApplicationContext()
从类复制的说明:ApplicationObjectSupport
Subclasses can override this for custom initialization behavior.The default implementation is empty. Called by
ApplicationObjectSupport.initApplicationContext(org.springframework.context.ApplicationContext)
.
handleRenderRequestInternal
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) throws Exception
Return a ModelAndView object with the specified view name.