org.jboss.weld.jsf
Class WeldPhaseListener
java.lang.Object
org.jboss.weld.jsf.WeldPhaseListener
- All Implemented Interfaces:
- Serializable, EventListener, javax.faces.event.PhaseListener
public class WeldPhaseListener
- extends Object
- implements javax.faces.event.PhaseListener
A JSF phase listener that initializes aspects of Weld in a more fine-grained, integrated manner than what is possible with a
servlet filter. This phase listener works in conjunction with other hooks and callbacks registered with the JSF runtime to
help manage the Weld lifecycle.
The phase listener restores the long-running conversation if the conversation id token is detected in the request, activates
the conversation context in either case (long-running or transient), and finally passivates the conversation after the
response has been committed.
Execute before every phase in the JSF life cycle. The order this phase listener executes in relation to other phase listeners
is determined by the ordering of the faces-config.xml descriptors. This phase listener should take precedence over
extensions.
- Author:
- Nicklas Karlsson, Dan Allen, Ales Justin, Lincoln Baxter, III
- See Also:
- Serialized Form
Method Summary |
void |
afterPhase(javax.faces.event.PhaseEvent phaseEvent)
|
void |
beforePhase(javax.faces.event.PhaseEvent phaseEvent)
|
static String |
getConversationId(javax.faces.context.FacesContext facesContext,
org.jboss.weld.context.ConversationContext conversationContext)
Gets the propagated conversation id parameter from the request |
javax.faces.event.PhaseId |
getPhaseId()
The phase id for which this phase listener is active. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_CID
public static final String NO_CID
- See Also:
- Constant Field Values
WeldPhaseListener
public WeldPhaseListener()
beforePhase
public void beforePhase(javax.faces.event.PhaseEvent phaseEvent)
- Specified by:
beforePhase
in interface javax.faces.event.PhaseListener
afterPhase
public void afterPhase(javax.faces.event.PhaseEvent phaseEvent)
- Specified by:
afterPhase
in interface javax.faces.event.PhaseListener
getPhaseId
public javax.faces.event.PhaseId getPhaseId()
- The phase id for which this phase listener is active. This phase listener observes all JSF life-cycle phases.
- Specified by:
getPhaseId
in interface javax.faces.event.PhaseListener
getConversationId
public static String getConversationId(javax.faces.context.FacesContext facesContext,
org.jboss.weld.context.ConversationContext conversationContext)
- Gets the propagated conversation id parameter from the request
- Returns:
- The conversation id (or null if not found)
Copyright © 2013 Seam Framework. All Rights Reserved.