users@glassfish.java.net

Re: Why does _at_ViewScoped not work?

From: Dominik Dorn <dominik.dorn_at_gmail.com>
Date: Sat, 18 Sep 2010 18:20:54 +0200

There are some problems with @ViewScoped (which is a javax.faces bean)
and @Model (which is from javax.inject )

Try the Seam-Faces 3 Module, it should address some of these issues.
http://seamframework.org/Seam3/FacesModule




On Sat, Sep 18, 2010 at 5:48 PM, <glassfish_at_javadesktop.org> wrote:
> I have a backing bean for a new user registration form, and I use <f:ajax> to interact with the user.  So this means the backing bean has to carry the state of what is currently selected until the user hits the go button.
>
> So the bean is annotated @java.faces.bean.ViewScoped and @javax.enterprise.inject.Model.
>
> For a few cycles of user interaction, the bean stays persistent, then for some reason it is discarded and a new one is instantiated, throwing all the state away.  I can make the problem go away by going to SessionScoped, but that seems like a poor solution.
>
> Do I misunderstand what @ViewScoped is supposed to do?  I can't find any formal description other than "as long as the user stays on the view" the managed beans in the view scope are supposed to stay there.  If this seems wrong, how do I go about trying to debug this?
> [Message sent by forum member 'alan94539']
>
> http://forums.java.net/jive/thread.jspa?messageID=483055
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>



-- 
Dominik Dorn
http://dominikdorn.com
http://twitter.com/domdorn
Tausche Deine Lernunterlagen auf http://www.studyguru.eu !