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, java.io.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
`java.lang.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(java.lang.String actionListener)` Takes a comma delimited string of class names and stores the names in an `ArrayList`.
`void` | `setDefaultLocale(java.lang.String defaultLocale)` Stores a String representation of the defaultLocale.
`void` | `setDefaultRenderKitId(java.lang.String defaultRenderKitId)` A `String` to be used as the defaultRenderKitId for the jsf application.
`void` | `setLifecycleId(java.lang.String id)` Sets the lifecycle id
`void` | `setMessageBundle(java.lang.String messageBundle)` Stores the messageBundle to be used to configure the jsf Application.
`void` | `setNavigationHandler(java.lang.String navigationHandlerName)` Takes a comma delimited string of class names and stores the names in an `ArrayList`.
`void` | `setPropertyResolver(java.lang.String propertyResolverName)` Takes a comma delimited string of class names and stores the names in an `ArrayList`.
`void` | `setStateManager(java.lang.String stateManagerName)` Takes a comma delimited string of class names and stores the names in an `ArrayList`.
`void` | `setSupportedLocale(java.lang.String supportedLocale)` Takes a comma delimited string of local names and stores the names in an `ArrayList`.
`void` | `setVariableResolver(java.lang.String variableResolverName)` Takes a comma delimited string of class names and stores the names in an `ArrayList`.
`void` | `setViewHandler(java.lang.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(java.lang.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 java.lang.String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
                               throws java.lang.Exception

  Creates the faces context for other phases.

  Specified by:
    `intercept` in interface `com.opensymphony.xwork2.interceptor.Interceptor`
  Parameters:
    `invocation` - The action invocation
  Throws:
    `java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String messageBundle)

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

  Parameters:
    `messageBundle` - The messageBundle

### setNavigationHandler

    public void setNavigationHandler(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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-2007 Apache Software Foundation. All Rights Reserved.