You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by kewldude <pa...@yahoo.com> on 2007/08/08 18:44:26 UTC

Using PhaseListeners

Is there a way to detect which phase is currently being executed inside the
backing bean? I need to detect the Apply Request Values Phase inside my
managed bean.

Okay lets say i have created a public class that implements PhaseListener,
ive registered it in the faces-config.xml. How do I capture the Apply
Request Values phase inside my managed bean?
-- 
View this message in context: http://www.nabble.com/Using-PhaseListeners-tf4237678.html#a12057340
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Using PhaseListeners

Posted by Cagatay Civici <ca...@gmail.com>.
AFAIK, JSF 2.0 will provide this feature, until then we can do tricks like
making the managed beans aware of the jsf lifecycle.

An example;

http://cagataycivici.wordpress.com/2006/06/06/managed_beans_aware_of_the/

Cagatay

On 8/8/07, Andrew Robinson <an...@gmail.com> wrote:
>
> Not that I know of. You can create a PhaseListener with a request
> variable though and get the value from that phase listener or get the
> request variable out from the backing bean.
>
> On 8/8/07, kewldude <pa...@yahoo.com> wrote:
> >
> > Is there a way to detect which phase is currently being executed inside
> the
> > backing bean? I need to detect the Apply Request Values Phase inside my
> > managed bean.
> >
> > Okay lets say i have created a public class that implements
> PhaseListener,
> > ive registered it in the faces-config.xml. How do I capture the Apply
> > Request Values phase inside my managed bean?
> > --
> > View this message in context:
> http://www.nabble.com/Using-PhaseListeners-tf4237678.html#a12057340
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
> >
>

Re: Using PhaseListeners

Posted by Andrew Robinson <an...@gmail.com>.
Not that I know of. You can create a PhaseListener with a request
variable though and get the value from that phase listener or get the
request variable out from the backing bean.

On 8/8/07, kewldude <pa...@yahoo.com> wrote:
>
> Is there a way to detect which phase is currently being executed inside the
> backing bean? I need to detect the Apply Request Values Phase inside my
> managed bean.
>
> Okay lets say i have created a public class that implements PhaseListener,
> ive registered it in the faces-config.xml. How do I capture the Apply
> Request Values phase inside my managed bean?
> --
> View this message in context: http://www.nabble.com/Using-PhaseListeners-tf4237678.html#a12057340
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>