AjaxViewRoot does not work the same way with Facelets as with JSP pages

View: New views
3 Messages — Rating Filter:   Alert me  

AjaxViewRoot does not work the same way with Facelets as with JSP pages

by Paulo Pinto :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi eveyone,

I have a PhaseListener that used to work in a JSP based application but it fails to work when the
view technology is Facelets.

The the JSP version of the page, the PhaseListener was able to get hold of the AjaxViewRoot and
navigate the component tree to get hold of the required components for its task.

Now with Facelets, the AjaxViewRoot instance always returns the information that it doesn't have
any children.

Is this a known behavior?

Thanks in Advance,
Paulo

Re: AjaxViewRoot does not work the same way with Facelets as with JSP pages

by Werner Punz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Paulo Pinto schrieb:

> Hi eveyone,
>
> I have a PhaseListener that used to work in a JSP based application but
> it fails to work when the
> view technology is Facelets.
>
> The the JSP version of the page, the PhaseListener was able to get hold
> of the AjaxViewRoot and
> navigate the component tree to get hold of the required components for
> its task.
>
> Now with Facelets, the AjaxViewRoot instance always returns the
> information that it doesn't have
> any children.
>
> Is this a known behavior?
>
> Thanks in Advance,
> Paulo
I assume this is an issue of the underlying component framework
(a4j I assume) there might have been some phase shifting going on,
what you could try is to move your phase listener to a later phase
(possibly prerender) if that does not help, rich faces/a4j has its own
forum you might get a better answer there from the developers.
While facelets does a lot, I assume it is innocent in this case, a4j
probably is to blame here.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: AjaxViewRoot does not work the same way with Facelets as with JSP pages

by Paulo Pinto :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

thanks for replying to my problem. That is a quite old issue, and I solved it exactly as you
suggested. I had to change the phase when the listener gets called.

Thanks anyway,
Paulo

On Tue, Sep 8, 2009 at 9:17 PM, Werner Punz <werner.punz@...> wrote:
Paulo Pinto schrieb:

Hi eveyone,

I have a PhaseListener that used to work in a JSP based application but it fails to work when the
view technology is Facelets.

The the JSP version of the page, the PhaseListener was able to get hold of the AjaxViewRoot and
navigate the component tree to get hold of the required components for its task.

Now with Facelets, the AjaxViewRoot instance always returns the information that it doesn't have
any children.

Is this a known behavior?

Thanks in Advance,
Paulo
I assume this is an issue of the underlying component framework
(a4j I assume) there might have been some phase shifting going on,
what you could try is to move your phase listener to a later phase (possibly prerender) if that does not help, rich faces/a4j has its own forum you might get a better answer there from the developers.
While facelets does a lot, I assume it is innocent in this case, a4j probably is to blame here.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...