Hi,
I have a phase listener defined in a backing bean constructor:
...
LifecycleFactory lifecycleFactory =
(LifecycleFactory)
FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
Lifecycle lifecycle =
lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
lifecycle.addPhaseListener(new PhaseListener()
{
public void beforePhase(PhaseEvent event)
{
if (event.getPhaseId() == PhaseId.RENDER_RESPONSE)
{
// invoke a method of the backing bean from this
anonymous class
}
}
public void afterPhase(PhaseEvent event)
{
if (event.getPhaseId() == PhaseId.INVOKE_APPLICATION)
{
}
}
public PhaseId getPhaseId()
{
return PhaseId.ANY_PHASE;
}
});
...
How does this phase listener work ? I thought the call of the backing
bean class will only affect the backing bean in the current session. But
after debug it seems that all backing bean of all users are affected.
Does someone know the behaviour exactly ?
Thanks,
Oliver