2 Replies Latest reply on Jun 14, 2007 3:05 AM by Bernd Müller

    disable ui element by user role

    Bernd Müller Newbie

      i have a problem in using security roles. The code

      <s:div class="entry" rendered="#{s:hasRole('Premiumkunde')}">
       <div class="label">Kreditkarte:</div>
       <div class="input">
       <h:selectOneMenu id="kreditkarte" value="#{kontenHandler.kreditk
      arte}" rendered="#{s:hasRole('Premiumkunde')}">
       <f:selectItem itemLabel="MasterCard" itemValue="MasterCar
      d" />
       <f:selectItem itemLabel="Visa" itemValue="Visa" />
       <f:selectItem itemLabel="American Express" itemValue="American Express" />

      throws a
      java.lang.IllegalArgumentException: Component property class is not writable

      cause of the first s:hasRole.
      If i remove the first s:hasRole it works fine. i.e. the second s:hasRole works.
      However i want to not display the label as well as the input only by the
      outer s:hasRole.
      btw the second s:hasRole is unneccesary and only included to show my

      Can anybody help me?
      I am using 1.2.1 GA

      Thanks Bernd