On Fri, 2008-06-20 at 11:17 +0200, Matthias Berndt wrote:
> Greetings,
> 
> I've got a (hopefully) simple question.
> 
> Should a FacesContext exist at the moment, when a Phaselistener is
> contructed (Contructor called)?
> 

Nope.

A PhaseListener is an object that exists outside of any particular
request; the same instance is used for every request received by a
webapp.

A FacesContext instance is created for each request, and is discarded
when the request ends.

So there is no FacesContext when a PhaseListener is constructed; there
*is* a FacesContext available when any of the standard callback methods
on the PhaseListener is invoked.

Regards,
Simon

Reply via email to