0 Replies Latest reply on May 24, 2009 1:01 AM by Matias Santana

    Define view of a button evaluating two expressions

    Matias  Santana Newbie

      Hi everyone!
      I want to set the view attribute of a s:button, by evaluating two expressions like this:




      <s:button view="/home.xhtml" value="Home" propagation="none" image="#{request.contextPath}/img/house.png" rendered="#{identity.loggedIn}"/>


      But in the view i want to evaluate if the currentUser is Administrator or an alternative could be, set two buttons and change the rendered attribute but i want to know how can i make something like rendered if identity.loggedIn and identity.hasRole('Administrator').
      Also want to know how can a made something like rendered if not identity.hasRole('Administrator').
      Thanx in advice guys!!