You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Lisa <ap...@purpleblade.net> on 2007/02/06 23:08:04 UTC
Detecting which phase being processed in backing bean
Is there a way to detect which phase is currently being executed inside the
backing bean. Having trouble with things and would simply like to see the
status of things at the beginning and end of each of the six JSF phases.
thanks
L
--
View this message in context: http://www.nabble.com/Detecting-which-phase-being-processed-in-backing-bean-tf3183519.html#a8835525
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: Detecting which phase being processed in backing bean
Posted by Simon Kitching <si...@rhe.co.nz>.
Lisa wrote:
> Is there a way to detect which phase is currently being executed inside the
> backing bean. Having trouble with things and would simply like to see the
> status of things at the beginning and end of each of the six JSF phases.
Not directly AFAIK.
It's easy enough to write a simple PhaseListener that logs a message at
each phase, and optionally stores the current phase in a static variable
somewhere.
The facestrace.sourceforge.net project might also be useful to you.
Regards, Simon
Re: Detecting which phase being processed in backing bean
Posted by Werner Punz <we...@gmail.com>.
Lisa schrieb:
> Is there a way to detect which phase is currently being executed inside the
> backing bean. Having trouble with things and would simply like to see the
> status of things at the beginning and end of each of the six JSF phases.
>
You can use phase listenes with callbacks as Simon mentioned
but for easier phase handling I can really recommend
the shale view controller.
It trims the number of callbacks down to four which also have
a clearer naming, and also, they are defined callbacks which for sure
are called every time.
Phases can occur or can be suppressed, for many cases where you usually
want to apply phase listeners the shale view controller is a
better pattern.