de.mindmatters.faces.spring.context.servlet
Class FacesControllerAdapter
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
de.mindmatters.faces.spring.context.servlet.AbstractFacesController
de.mindmatters.faces.spring.context.servlet.FacesControllerAdapter
- All Implemented Interfaces:
- ApplicationContextAware, Controller, InitializingBean, ServletContextAware
- public final class FacesControllerAdapter
- extends AbstractFacesController
Adapter used by the modified
DispatcherServlet
(via
the
FacesControllerHandlerAdapter
to integrate proprietary Controller to the faces lifecycle.
With the help of this adapter a FacesContext will be created for an assured
render phase.
- Author:
- Andreas Kuhrwahl
- See Also:
#handle(HttpServletRequest, HttpServletResponse, Object)
Method Summary |
protected ModelAndView |
handleRequestInternal(FacesContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Template method. Subclasses must implement this. The contract is the same
as for handleRequest . |
protected void |
initFacesController()
Hook method for subclasses for initialization purposes. |
void |
setController(Controller controller)
Sets the adapted Controller to delegate to. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FacesControllerAdapter
public FacesControllerAdapter()
- Constructor for use as a bean.
FacesControllerAdapter
public FacesControllerAdapter(Controller controller)
- Creates a FacesControllerAdapter with the given delegate
controller
.
- Parameters:
controller
- the adapted Controller to delegate to
initFacesController
protected void initFacesController()
- Hook method for subclasses for initialization purposes.
- Overrides:
initFacesController
in class AbstractFacesController
setController
public void setController(Controller controller)
- Sets the adapted Controller to delegate to.
- Parameters:
controller
- the adapted Controller to delegate to
handleRequestInternal
protected ModelAndView handleRequestInternal(FacesContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
- Template method. Subclasses must implement this. The contract is the same
as for
handleRequest
.
- Specified by:
handleRequestInternal
in class AbstractFacesController
- Parameters:
context
- current FacesContextrequest
- current HTTP requestresponse
- current HTTP response
- Returns:
- a ModelAndView to render, or
null
if handled
directly
- Throws:
java.lang.Exception
- in case of errors- See Also:
#handleRequest(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
Copyright © 2002 mindmatters GmbH & Co. KG