org.apache.struts2.jsf
Class FacesInterceptor

java.lang.Object
  extended by org.apache.struts2.jsf.FacesSupport
      extended by org.apache.struts2.jsf.FacesInterceptor
All Implemented Interfaces:
Interceptor, java.io.Serializable
Direct Known Subclasses:
ApplyRequestValuesInterceptor, InvokeApplicationInterceptor, ProcessValidationsInterceptor, RestoreViewInterceptor, UpdateModelValuesInterceptor

public class FacesInterceptor
extends FacesSupport
implements Interceptor

Translates JSF phases into individual interceptors, and adapts their expected workflow to Action 2

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts2.jsf.FacesSupport
FACES_ENABLED, log
 
Constructor Summary
FacesInterceptor()
           
 
Method Summary
 void destroy()
          Not used
protected  boolean executePhase(java.lang.String viewId, javax.faces.context.FacesContext facesContext)
          Executes the specific phase.
 void init()
          Not used
 java.lang.String intercept(ActionInvocation invocation)
          Adapts the phase workflow to Action 2
protected  boolean isFacesEnabled(ActionContext ctx)
          Determines whether to process this request with the JSF phases
 
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

FacesInterceptor

public FacesInterceptor()
Method Detail

init

public void init()
Not used

Specified by:
init in interface Interceptor

intercept

public java.lang.String intercept(ActionInvocation invocation)
                           throws java.lang.Exception
Adapts the phase workflow to Action 2

Specified by:
intercept in interface Interceptor
Parameters:
invocation - The action invocation
Returns:
The string result code
Throws:
java.lang.Exception

executePhase

protected boolean executePhase(java.lang.String viewId,
                               javax.faces.context.FacesContext facesContext)
Executes the specific phase. The phase id is constructed as a composite of the namespace and action name.

Parameters:
viewId - The view id
facesContext - The current faces context
Returns:
True if the next phases should be skipped

destroy

public void destroy()
Not used

Specified by:
destroy in interface Interceptor

isFacesEnabled

protected boolean isFacesEnabled(ActionContext ctx)
Determines whether to process this request with the JSF phases

Parameters:
ctx - The current action context
Returns:
True if it is a faces-enabled request


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.