5 Replies Latest reply on Aug 31, 2006 4:27 PM by javri28

    Newbie question: access session attribute from view

    javri28

      Hi everybody!

      I have one may ba stupid question, but I could't find any answer on it...

      On my page I have to check if the user is logged in(let's say there should be shown different images for logged and not-logged user).

      I have User component in session scope. During registration I'm doing common thing:

      Contexts.getSessionContext().set("loggedIn", true);

      The only condition that I have found for my "rendered" attributes on pages to check if the user is logged-in is #{user.userName != null}.

      Is this the only way to do it on the page?
      I just whant to be sure before I use it everywhere(not in many places, but it doesn't metter)

      I hope I have explained a problem correctly.

      Thanks in advance!