|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
public class ParameterizableViewController
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):
handleRenderRequestInternal
which
just returns the view, named by the configuration property
viewName
. Nothing more, nothing lessThis 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) |
Field Summary |
---|
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
ParameterizableViewController()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.springframework.web.portlet.mvc.AbstractController |
---|
handleActionRequest, handleActionRequestInternal, handleRenderRequest, isRenderWhenMinimized, isSynchronizeOnSession, setRenderWhenMinimized, setSynchronizeOnSession |
Methods inherited from class org.springframework.web.portlet.handler.PortletContentGenerator |
---|
applyCacheSeconds, cacheForSeconds, check, checkAndPrepare, checkAndPrepare, getCacheSeconds, isRequireSession, preventCaching, setCacheSeconds, setRequireSession |
Methods inherited from class org.springframework.web.portlet.context.PortletApplicationObjectSupport |
---|
getPortletContext, getTempDir, isContextRequired, setPortletContext |
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 ParameterizableViewController()
Method Detail |
---|
public void setViewName(String viewName)
public String getViewName()
protected void initApplicationContext()
ApplicationObjectSupport
setApplicationContext
after setting the context instance.
Note: Does not get called on reinitialization of the context but rather just on first initialization of this object's context reference.
initApplicationContext
in class ApplicationObjectSupport
ApplicationObjectSupport.setApplicationContext(org.springframework.context.ApplicationContext)
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) throws Exception
handleRenderRequestInternal
in class AbstractController
Exception
AbstractController.handleRenderRequest(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
,
AbstractController.handleActionRequestInternal(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |