-
1. Re: Newbie question: access session attribute from view
raja05 Aug 30, 2006 2:09 PM (in response to javri28)Since you store the "loggedIn" in the session scope, you can use the "rendered" to be something like
<.... rendered="#{loggedIn != null}" />
Seam automatically would look for the loggedIn attribute in all the scopes and you could render the components accordingly. -
2. Re: Newbie question: access session attribute from view
ssilvert Aug 30, 2006 2:10 PM (in response to javri28)If I understand you correctly, this should work:
rendered="#{sessionScope.loggedIn}" -
3. Re: Newbie question: access session attribute from view
javri28 Aug 31, 2006 11:27 AM (in response to javri28)@raja05, @stan.silvert@jboss.com
Thanks a lot, guys!
Both variants are functioning properly. -
4. Re: Newbie question: access session attribute from view
ssilvert Aug 31, 2006 2:37 PM (in response to javri28)For what it's worth, #{sessionScope.loggedIn} should be a little faster. "sessionScope" is an implicit object. Implicit objects are always evaluated first by the ELResolver. Searching of all the scopes usually happens last.
Stan -
5. Re: Newbie question: access session attribute from view
javri28 Aug 31, 2006 4:27 PM (in response to javri28)I agree - this is a better way - to know thet you are using the attribute of the RIGHT SCOPE.