Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.jsf
Class FacesSetupInterceptor

    java.lang.Object
      org.apache.struts2.jsf.FacesSupport
          org.apache.struts2.jsf.FacesSetupInterceptor

All Implemented Interfaces:
  com.opensymphony.xwork2.interceptor.Interceptor, Serializable

    public class FacesSetupInterceptor

extends FacesSupport
implements com.opensymphony.xwork2.interceptor.Interceptor

* Initializes the JSF context for this request.

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.

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.struts2.jsf.FacesSupport
`FACES_ENABLED, log`

Constructor Summary
`FacesSetupInterceptor()`

Method Summary
`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`.

Methods inherited from class org.apache.struts2.jsf.FacesSupport
`informPhaseListenersAfter, informPhaseListenersBefore, isResponseComplete, setLifecycle, shouldRenderResponse`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FacesSetupInterceptor

    public FacesSetupInterceptor()

Method Detail

### setLifecycleId

    public void setLifecycleId(String id)

  Sets the lifecycle id

  Parameters:
    `id` - The id

### init

    public void init()

  Initializes the lifecycle and factories

  Specified by:
    `init` in interface `com.opensymphony.xwork2.interceptor.Interceptor`

### intercept

    public String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
                     throws Exception

  Creates the faces context for other phases.

  Specified by:
    `intercept` in interface `com.opensymphony.xwork2.interceptor.Interceptor`
  Parameters:
    `invocation` - The action invocation
  Throws:
    `Exception`

### destroy

    public void destroy()

  Cleans up the lifecycle and factories

  Specified by:
    `destroy` in interface `com.opensymphony.xwork2.interceptor.Interceptor`

### isFacesAction

    protected boolean isFacesAction(com.opensymphony.xwork2.ActionInvocation inv)

  Determines if this action mapping will be have a JSF view

  Parameters:
    `inv` - The action invocation
  Returns:
    True if the JSF interceptors should fire

### setActionListener

    public void setActionListener(String actionListener)

  Takes a comma delimited string of class names and stores the names in an `ArrayList`. The incoming `String` will be cleaned of any whitespace characters before the class names are stored.

  Parameters:
    `actionListener` - A comma delimited string of class names

### setDefaultRenderKitId

    public void setDefaultRenderKitId(String defaultRenderKitId)

  A `String` to be used as the defaultRenderKitId for the jsf application. The incoming `String` will be cleaned of whitespace characters.

  Parameters:
    `defaultRenderKitId` - The defaultRenderKitId

### setSupportedLocale

    public void setSupportedLocale(String supportedLocale)

  Takes a comma delimited string of local names and stores the names in an `ArrayList`. The incoming `String` will be cleaned of any whitespace characters before the class names are stored.

  Parameters:
    `supportedLocale` - A comma delimited string of local names

### setDefaultLocale

    public void setDefaultLocale(String defaultLocale)

  Stores a String representation of the defaultLocale. The incoming `String` will be cleaned of any whitespace characters before the class names are stored.

  Parameters:
    `defaultLocale` - The default local

### setMessageBundle

    public void setMessageBundle(String messageBundle)

  Stores the messageBundle to be used to configure the jsf Application.

  Parameters:
    `messageBundle` - The messageBundle

### setNavigationHandler

    public void setNavigationHandler(String navigationHandlerName)

  Takes a comma delimited string of class names and stores the names in an `ArrayList`. The incoming `String` will be cleaned of any whitespace characters before the class names are stored.

  Parameters:
    `navigationHandlerName` - A comma delimited string of class names

### setPropertyResolver

    public void setPropertyResolver(String propertyResolverName)

  Takes a comma delimited string of class names and stores the names in an `ArrayList`. The incoming `String` will be cleaned of any whitespace characters before the class names are stored.

  Parameters:
    `propertyResolverName` - A comma delimited string of class names

### setStateManager

    public void setStateManager(String stateManagerName)

  Takes a comma delimited string of class names and stores the names in an `ArrayList`. The incoming `String` will be cleaned of any whitespace characters before the class names are stored.

  Parameters:
    `stateManagerName` - A comma delimited string of class names

### setVariableResolver

    public void setVariableResolver(String variableResolverName)

  Takes a comma delimited string of class names and stores the names in an `ArrayList`. The incoming `String` will be cleaned of any whitespace characters before the class names are stored.

  Parameters:
    `variableResolverName` - A comma delimited string of class names

### setViewHandler

    public void setViewHandler(String viewHandlerName)

  Takes a comma delimited string of class names and stores the names in an `ArrayList`. The incoming `String` will be cleaned of any whitespace characters before the class names are stored.

  Parameters:
    `viewHandlerName` - A comma delimited string of class names

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2017 Apache Software Foundation. All rights reserved.