Top Description Fields Constructors Methods
com.sun.faces.lifecycle

public Class ELResolverInitPhaseListener

extends Object
implements PhaseListener
Class Inheritance
All Implemented Interfaces
javax.faces.event.PhaseListener, java.io.Serializable, java.util.EventListener
Imports
com.sun.faces.application.ApplicationAssociate, com.sun.faces.util.FacesLogger, com.sun.faces.el.ELUtils, .FacesCompositeELResolver, javax.faces.FactoryFinder, javax.faces.context.FacesContext, javax.faces.event.PhaseEvent, .PhaseId, .PhaseListener, javax.faces.lifecycle.Lifecycle, .LifecycleFactory, java.util.Iterator, java.util.logging.Level, .Logger, javax.faces.application.Application

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

Field Summary

Modifier and TypeField and Description
private static Logger
private boolean
private boolean
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
afterPhase(PhaseEvent
the phase event.
event
)

Implements javax.faces.event.PhaseListener.afterPhase.

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

public synchronized void
beforePhase(PhaseEvent
the phase event.
event
)

Implements javax.faces.event.PhaseListener.beforePhase.

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

public PhaseId
getPhaseId()

Implements javax.faces.event.PhaseListener.getPhaseId.

Return the identifier of the request processing phase during which this listener is interested in processing javax.faces.event.PhaseEvent events.

protected void
populateFacesELResolverForJsp(FacesContext
- the FacesContext for the current request
context
)

Populate the FacesCompositeELResolver stack registered with JSP if a request is being processed for the very first time.

public static void
public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static Logger LOGGER
postInitCompletedback to summary
private boolean postInitCompleted
preInitCompletedback to summary
private boolean preInitCompleted
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

ELResolverInitPhaseListenerback to summary
public ELResolverInitPhaseListener()

Method Detail

afterPhaseback to summary
public synchronized void afterPhase(PhaseEvent event)

Implements javax.faces.event.PhaseListener.afterPhase.

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.

Parameters
event:PhaseEvent

Doc from javax.faces.event.PhaseListener.afterPhase.

the phase event.

Annotations
@Override
beforePhaseback to summary
public synchronized void beforePhase(PhaseEvent event)

Implements javax.faces.event.PhaseListener.beforePhase.

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).

Parameters
event:PhaseEvent

Doc from javax.faces.event.PhaseListener.beforePhase.

the phase event.

Annotations
@Override
getPhaseIdback to summary
public PhaseId getPhaseId()

Implements javax.faces.event.PhaseListener.getPhaseId.

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

We return PhaseId.ANY_PHASE.

Returns:PhaseId

Doc from javax.faces.event.PhaseListener.getPhaseId.

the phase id.

Annotations
@Override
populateFacesELResolverForJspback to summary
protected void populateFacesELResolverForJsp(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:FacesContext

- the FacesContext for the current request

populateFacesELResolverForJspback to summary
public static void populateFacesELResolverForJsp(Application app, ApplicationAssociate appAssociate)
removeELResolverInitPhaseListenerback to summary
public static void removeELResolverInitPhaseListener()