myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simon <>
Subject Re: PhaseListener contruction in relation to FacesContext
Date Fri, 20 Jun 2008 09:29:18 GMT

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


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

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.


View raw message