You can’t. But you can use <h:outputText> for anonymous visitors (read-only) and <rich:inplaceInput> for known logged-in users (write-enabled.) Customize the inplaceInputTest.xhtml s:hasRole() parameter to give the proper boolean value on whether the logged-in user is an administrator or not of the field bound to the input.

Define a custom tag to replace <rich:inplaceInput>




Below, evaluation of the rendered="" attribute decides which of the two elements appear at one time.



Custom <mytaglib:inplaceInput> Usage