public class FacesSetupInterceptor extends FacesSupport implements com.opensymphony.xwork2.interceptor.Interceptor
The JSF Application can additionaly be configured from the Struts.xml by adding <param> tags to the jsfSetup <interceptor-ref>.
Example struts.xml configuration:
<interceptor-ref name="jsfSetup"> <param name="actionListener"></param> <param name="defaultRenderKitId"></param> <param name="supportedLocale"></param> <param name="defaultLocale"></param> <param name="messageBundle"></param> <param name="navigationHandler">org.apache.struts2.jsf.StrutsNavigationHandler</param> <param name="propertyResolver"></param> <param name="stateManager"></param> <param name="variableResolver"> org.apache.myfaces.el.VariableResolverImpl ,org.apache.struts2.jsf.StrutsVariableResolver </param> <param name="viewHandler;">org.apache.shale.tiles.TilesViewHandler</param> </interceptor-ref>
Note: None of the parameters are required but all are shown in the example for completeness.
FACES_ENABLED, log
Constructor and Description |
---|
FacesSetupInterceptor() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Cleans up the lifecycle and factories
|
void |
init()
Initializes the lifecycle and factories
|
String |
intercept(com.opensymphony.xwork2.ActionInvocation invocation)
Creates the faces context for other phases.
|
protected boolean |
isFacesAction(com.opensymphony.xwork2.ActionInvocation inv)
Determines if this action mapping will be have a JSF view
|
void |
setActionListener(String actionListener)
Takes a comma delimited string of class names and stores the names in an
ArrayList . |
void |
setDefaultLocale(String defaultLocale)
Stores a String representation of the defaultLocale.
|
void |
setDefaultRenderKitId(String defaultRenderKitId)
A
String to be used as the defaultRenderKitId for the jsf
application. |
void |
setLifecycleId(String id)
Sets the lifecycle id
|
void |
setMessageBundle(String messageBundle)
Stores the messageBundle to be used to configure the jsf Application.
|
void |
setNavigationHandler(String navigationHandlerName)
Takes a comma delimited string of class names and stores the names in an
ArrayList . |
void |
setPropertyResolver(String propertyResolverName)
Takes a comma delimited string of class names and stores the names in an
ArrayList . |
void |
setStateManager(String stateManagerName)
Takes a comma delimited string of class names and stores the names in an
ArrayList . |
void |
setSupportedLocale(String supportedLocale)
Takes a comma delimited string of local names and stores the names in an
ArrayList . |
void |
setVariableResolver(String variableResolverName)
Takes a comma delimited string of class names and stores the names in an
ArrayList . |
void |
setViewHandler(String viewHandlerName)
Takes a comma delimited string of class names and stores the names in an
ArrayList . |
informPhaseListenersAfter, informPhaseListenersBefore, isResponseComplete, setLifecycle, shouldRenderResponse
public void setLifecycleId(String id)
id
- The idpublic void init()
init
in interface com.opensymphony.xwork2.interceptor.Interceptor
public String intercept(com.opensymphony.xwork2.ActionInvocation invocation) throws Exception
intercept
in interface com.opensymphony.xwork2.interceptor.Interceptor
invocation
- The action invocationException
public void destroy()
destroy
in interface com.opensymphony.xwork2.interceptor.Interceptor
protected boolean isFacesAction(com.opensymphony.xwork2.ActionInvocation inv)
inv
- The action invocationpublic void setActionListener(String actionListener)
ArrayList
. The incoming String
will be
cleaned of any whitespace characters before the class names are stored.actionListener
- A comma delimited string of class namespublic void setDefaultRenderKitId(String defaultRenderKitId)
String
to be used as the defaultRenderKitId for the jsf
application. The incoming String
will be cleaned of
whitespace characters.defaultRenderKitId
- The defaultRenderKitIdpublic void setSupportedLocale(String supportedLocale)
ArrayList
. The incoming String
will be
cleaned of any whitespace characters before the class names are stored.supportedLocale
- A comma delimited string of local namespublic void setDefaultLocale(String defaultLocale)
String
will be cleaned of any whitespace characters before
the class names are stored.defaultLocale
- The default localpublic void setMessageBundle(String messageBundle)
messageBundle
- The messageBundlepublic void setNavigationHandler(String navigationHandlerName)
ArrayList
. The incoming String
will be
cleaned of any whitespace characters before the class names are stored.navigationHandlerName
- A comma delimited string of class namespublic void setPropertyResolver(String propertyResolverName)
ArrayList
. The incoming String
will be
cleaned of any whitespace characters before the class names are stored.propertyResolverName
- A comma delimited string of class namespublic void setStateManager(String stateManagerName)
ArrayList
. The incoming String
will be
cleaned of any whitespace characters before the class names are stored.stateManagerName
- A comma delimited string of class namespublic void setVariableResolver(String variableResolverName)
ArrayList
. The incoming String
will be
cleaned of any whitespace characters before the class names are stored.variableResolverName
- A comma delimited string of class namespublic void setViewHandler(String viewHandlerName)
ArrayList
. The incoming String
will be
cleaned of any whitespace characters before the class names are stored.viewHandlerName
- A comma delimited string of class namesCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.