Facelets VDL.buildView drops programmatic component change

From: Martin Kočí <>
Date: Mon, 16 Nov 2009 15:43:31 +0100


i have a problem with Facelets2 (mojarra trunk) and component tree
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

FaceletViewHandlingStrategy.buildView contain a intresting if as first

if (Util.isViewPopulated(ctx, view)) {

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.

This problem is not present with JSP; with facelets only with partial
state saving=false.

Is it a bug?


Martin Kočí