On Tue, 2006-01-24 at 14:55 -0800, Ole Ersoy wrote:
> Hey Everybody,
> 
> I'm using myfaces 1.1.1.
> 
> I wrote a PhaseListener and it works fine the PhaseId
> is set to RESTORE_VIEW, however any other PhaseId does
> not work.
> 
> Has anyone else experienced something similar?

When a page is viewed for the first time, the RESTORE_VIEW phase
executes then processing immediately leaps to the RENDER phase, because
there is nothing for the other phases to do.

So APPLY_VALUES phase listeners will only be invoked when a page is
being "submitted", ie when some command link is clicked in the page, not
when the page is being displayed for the first time.

I suggest you change your getPhaseId to return PhaseId.ANY_PHASE and see
what callbacks you get. You should see restore+render for the first page
view, restore+apply+render for pages where validation fails, restore
+apply+render when an immediate command component is clicked, and the
full set of callbacks otherwise.

Regards,

Simon

Reply via email to