I want to set the modify authority of an p:inputText
in PrimeFaces, but I want to this on Xhtml page (not in the managed bean). For example I can use "Rendered" attribute to hide the p:inputText
for nonAdmin users. However, I want nonAdmin users to see the p:inputText
but they should not change the value, just admins can change/delete/update the value. The admins should have modify authority, non admin users should just have read authority. Is there any attribute like rendered
?
<p:inputText rendered="#{request.isUserInRole('Admin')}"
value="#{managedService.files.price}"/>
Note: I may do this on managed bean but I want to know whether it is possible on just xhtml page.