com.sun.faces.lifecycle
Class ELResolverInitPhaseListener

java.lang.Object
  extended by com.sun.faces.lifecycle.ELResolverInitPhaseListener
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.faces.event.PhaseListener

public class ELResolverInitPhaseListener
extends java.lang.Object
implements javax.faces.event.PhaseListener

This class is used to register the JSF ELResolver stack with the JSP container.

We overload it a bit to set a bit on the ApplicationAssociate stating we've processed a request to indicate the appliation is fully initialized.

After the first request, this PhaseListener will remove itself from all registered lifecycle instances registered with the application.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
ELResolverInitPhaseListener()
           
 
Method Summary
 void afterPhase(javax.faces.event.PhaseEvent event)
          Handle a notification that the processing for a particular phase has just been completed.
 void beforePhase(javax.faces.event.PhaseEvent event)
          Handle a notification that the processing for a particular phase of the request processing lifecycle is about to begin.
 javax.faces.event.PhaseId getPhaseId()
          Return the identifier of the request processing phase during which this listener is interested in processing PhaseEvent events.
protected  void populateFacesELResolverForJsp(javax.faces.context.FacesContext context)
          Populate the FacesCompositeELResolver stack registered with JSP if a request is being processed for the very first time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ELResolverInitPhaseListener

public ELResolverInitPhaseListener()
Method Detail

afterPhase

public void afterPhase(javax.faces.event.PhaseEvent event)

Handle a notification that the processing for a particular phase has just been completed.

When invoked, this phase listener will remove itself as a registered PhaseListener with all Lifecycle instances.

Specified by:
afterPhase in interface javax.faces.event.PhaseListener

beforePhase

public void beforePhase(javax.faces.event.PhaseEvent event)

Handle a notification that the processing for a particular phase of the request processing lifecycle is about to begin.

The implementation of this method currently calls through to populateFacesELResolverForJsp(javax.faces.context.FacesContext).

Specified by:
beforePhase in interface javax.faces.event.PhaseListener

getPhaseId

public javax.faces.event.PhaseId getPhaseId()

Return the identifier of the request processing phase during which this listener is interested in processing PhaseEvent events. Legal values are the singleton instances defined by the PhaseId class, including PhaseId.ANY_PHASE to indicate an interest in being notified for all standard phases.

We return PhaseId.ANY_PHASE.

Specified by:
getPhaseId in interface javax.faces.event.PhaseListener

populateFacesELResolverForJsp

protected void populateFacesELResolverForJsp(javax.faces.context.FacesContext context)
Populate the FacesCompositeELResolver stack registered with JSP if a request is being processed for the very first time. At the application initialiazation time, an empty CompositeELResolver is registered with JSP because ELResolvers can be added until the first request is serviced.

Parameters:
context - - the FacesContext for the current request


Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.