de.mindmatters.faces.spring.context.servlet.controller
Class Action
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.controller.Action
- All Implemented Interfaces:
- ApplicationContextAware, Controller, InitializingBean, ServletContextAware
- public class Action
- extends AbstractFacesController
This Controller executes the actions defined by the property
actions
or fromAction
respectively. It uses the
NavigationHandler
to render the appropriate
view (resolved by an outcome and the corresponding navigation rule).
Workflow
- execute the
actions
(must be
method bindings) if not empty
- whether execute the
fromAction
(if it's a method
binding and not null
) or use it as an outcome if
it's a string
- navigate with the help of the NavigationHandler and the evaluated
outcome to the proper view and render it (the outcome of the last executed
actions
method binding is used if fromAction
is
null
)
Exposed configuration properties:
name |
default |
description |
actions |
Collections.EMPTY_LIST |
method bindings returning an outcome (public String doBar(){...} ),
e.g. #{foo.doBar} |
fromAction |
null |
method binding returning an outcome (public String doBar(){...} ),
e.g. #{foo.doBar}, or a simple outcome (represented by a string) |
- Author:
- Andreas Kuhrwahl
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 |
initAction()
Hook method for subclasses for initialization purposes. |
protected void |
initFacesController()
Hook method for subclasses for initialization purposes. |
void |
setActions(java.util.List actions)
Sets the actions. |
void |
setFromAction(java.lang.String action)
Sets the from-action. |
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 |
Action
public Action()
initFacesController
protected final void initFacesController()
- Hook method for subclasses for initialization purposes.
- Overrides:
initFacesController
in class AbstractFacesController
initAction
protected void initAction()
- Hook method for subclasses for initialization purposes.
handleRequestInternal
protected final 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
.
- 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 - See Also:
#handleRequest(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
setFromAction
public final void setFromAction(java.lang.String action)
- Sets the from-action.
- Parameters:
action
- the action to set
setActions
public final void setActions(java.util.List actions)
- Sets the actions.
- Parameters:
actions
- the actions to set
Copyright © 2002 mindmatters GmbH & Co. KG