webtier@glassfish.java.net

Re: [webtier] Using ui:include with View Scoped beans

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Mon, 15 Feb 2010 16:15:12 -0800

On 2/15/10 4:12 PM, webtier_at_javadesktop.org wrote:
> I tried a variety of methods.
>
> I tried using a view scoped bean and trying to obtain a UIComponent off it using something like:
>
> <ui:component binding="#{MyViewScopedBean.someComponent}"/>
>
> But, as in the original case, the #{MyViewScopedBean.someComponent} expression is evaluated before the view scope is restored (because it is evaluated as part of the restoreView process) so, every page load, a new instance of MyViewScopedBean is created.
>
> I have resigned to the fact that View scopes in JSF 2.0 are somewhat useless for what I am trying to do for as long as the scope is restored after the component tree has been rebuilt. I can see exactly where it is happening in the code in JSF, it seems a little silly as to where it is occurring, however I really don't know what the implications are if it was to change.
>

The workaround is to set the javax.faces.PARTIAL_STATE_SAVING context
initialization parameter to false.
Doing so stops the logic that re-creates the view from the template
before applying state deltas.

> [Message sent by forum member 'mdergacz' (marc_at_skytix.com.au)]
>
> http://forums.java.net/jive/thread.jspa?messageID=386885
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>