Results 1 to 2 of 2

Thread: Read-Only Field ???

  1. #1
    Join Date
    May 2006
    Posts
    142

    Question Read-Only Field ???

    I am able to successfully implement Acegi JSF Component for Spring Security 2.0.2 into Facelets file but we have a requirement when a user is not in a particular role, then simply making it read-only field.

    Any pointers/suggestions will be greatly appreciated

  2. #2
    Join Date
    May 2006
    Posts
    142

    Exclamation

    I hope someone in the Forums will answer my posting.
    Even if user has same Role but different Privileges then certain fields will be displayed as read-Only Fields
    The following code snippet will either hide or render the component . But we want it to render as read-only fields
    Code:
     <acegijsf:authorize ifAllGranted="ROLE_USER">
       <h:inputText  id="manufName" value="#{manufacturerBean.namsManufacturer.name}" disabled="#{manufacturerBean.disableMode}" required="true">
    	 		 </h:inputText>	
    </acegijsf:authorize>
    The above UI Component should render as editable field for ROLE_ADMIN and read-only field for ROLE_USER

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •