[jsr-314-open] Amendment to section 2.2.1 Restore View

Dan Allen dan.j.allen at gmail.com
Mon Nov 2 19:17:22 EST 2009


This has been a problem with Facelets from the start. Facelets has always
built and serialized the component tree in one fell swoop. I've run into
this problem a number of times when trying to add default behavior to a
component tree.

Of course, you have the PreRenderViewEvent, which gets called just before
the rendering begins, so you have a populated tree at that point. However,
any changes to the tree are not recorded by the state saving mechanism (I'd
need to verify that).

Perhaps what we need instead is for the state saving to recheck if the
component tree state changed by a PreRenderViewEvent listener. (Of course, I
think you could do this yourself in one of these listeners, but not the
ideal solution).

This brings up an important documentation question. At what point in the
lifecycle do we recommend that the application add dynamic elements to the
component tree? Some guidance would be helpful.

-Dan

On Mon, Nov 2, 2009 at 4:52 PM, Ryan Lubke <Ryan.Lubke at sun.com> wrote:

> Please see Mojarra-1383 [1] for background on this issue.
>
> Based on this, it seems we would need to remove the last bullet item in
> this section that states:
>
>   "Publish an PostAddToViewEvent with the created UIViewRoot as the event
> source."
>
> and move the responsibility of publishing this event to
> ViewDeclarationLanguage.buildView() - the
> point when the view is actually populated.
>
> Thoughts?
>
> [1] https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1383
>



-- 
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20091102/18ff87b4/attachment.html 


More information about the jsr-314-open-mirror mailing list