Looking at the Seam docs:
Seam docs wrote : @Out(scope=ScopeType.SESSION)
|
| Specifies that a component attribute that is not a Seam component type is to be
outjected to a specific scope at the end of the invocation.
Ok, I can see that happening in practice. If I have a bean that has:
@Out(scope=ScopeType.SESSION) private String foo;
then that does in fact outject a string called "foo" into the session.
Obviously String is not a Seam component.
If I do the same code like this:
@Out(scope=ScopeType.SESSION) private User user;
where User is in fact a Seam-managed component, with a default (conversation) scope, it
doesn't work.
Hmm. Does this mean that I should have multiple roles for my Seam components? Like for
User, we want one user that is session-scoped, for the guy who is logged in, and we want
another user that is conversation scoped, for creating a new user. Is the right way to do
this to have two Roles attached to user, one session-scope and the other default
(conversation) scoped?
I'm just trying to figure out what's the best practice on this.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012272#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...