use of com.sun.faces.application.ApplicationAssociate in project mojarra by eclipse-ee4j.
the class ELResolverInitPhaseListener method afterPhase.
// ---------------------------------------------- Methods From PhaseListener
/**
* <p>
* Handle a notification that the processing for a particular phase has just been completed.
* </p>
*
* <p>
* When invoked, this phase listener will remove itself as a registered <code>PhaseListener</code> with all
* <code>Lifecycle</code> instances.
*/
@Override
public synchronized void afterPhase(PhaseEvent event) {
if (!postInitCompleted && PhaseId.RENDER_RESPONSE.equals(event.getPhaseId())) {
ApplicationAssociate associate = ApplicationAssociate.getInstance(event.getFacesContext().getExternalContext());
associate.setRequestServiced();
LifecycleFactory factory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
// the lifecycle instances
for (Iterator<String> i = factory.getLifecycleIds(); i.hasNext(); ) {
Lifecycle lifecycle = factory.getLifecycle(i.next());
lifecycle.removePhaseListener(this);
}
postInitCompleted = true;
}
}
use of com.sun.faces.application.ApplicationAssociate in project mojarra by eclipse-ee4j.
the class ELResolverInitPhaseListener method beforePhase.
@Override
public synchronized void beforePhase(PhaseEvent event) {
if (!preInitCompleted) {
ApplicationAssociate associate = ApplicationAssociate.getInstance();
associate.setRequestServiced();
associate.initializeELResolverChains();
preInitCompleted = true;
}
}
Aggregations