dev@javaserverfaces.java.net

Re: Facelets VDL.buildView drops programmatic component change

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Mon, 16 Nov 2009 08:24:05 -0800

On 11/16/09 6:43 AM, Martin Kočí wrote:
> Hi,
>
> i have a problem with Facelets2 (mojarra trunk) and component tree
> manipulation:
> in invoke application phase I switch two UIColumn in UIData (first
> columns goes last atd.) and I expect that this change will survive save
> state/restore state but it is not true. With some help of debugger it
> seems that
> com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FacesContext, UIViewRoot) reverts my component change back.
>
> The process is: first request -> RenderResponse calls VDL.buildView (ok)
> -> postback request> Restore View -> Invoke Application (listener
> performs component tree manipulation) -> RenderResponse calls
> VDL.buildView -> FaceletViewHandlingStrategy.buildView(FacesContext,
> UIViewRoot) rebuilds UIData from .xhtml and drops UIColumn's order
> change.
>
> FaceletViewHandlingStrategy.buildView contain a intresting if as first
> statement:
>
> if (Util.isViewPopulated(ctx, view)) {
> return;
> }
>
> Isn't for this case view already populated from Restore State phase?
> Probably it is and if I add Util.setViewPopulated in
> ViewHandlingStrategy.restoreView it fixes my problem.
>
Is there a navigation rule involved here?
> This problem is not present with JSP; with facelets only with partial
> state saving=false.
>
>
> Is it a bug?
>
>
> Regards,
>
> Martin Kočí
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>