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.
This problem is not present with JSP; with facelets only with partial
state saving=false.
Is it a bug?
Regards,
Martin Kočí