[jboss-user] [JBoss Seam] - disable ui element by user role

BerndMueller do-not-reply at jboss.com
Thu Jun 14 02:36:41 EDT 2007


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" />
  |                         </h:selectOneMenu>
  |                 </div>
  |                 </s:div>


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
problem.

Can anybody help me?
I am using 1.2.1 GA

Thanks Bernd

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054198#4054198

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054198



More information about the jboss-user mailing list