Conditional output of text box or label via custom JSF component?
843844Jul 20 2007 — edited Jul 23 2007Hi
I'm looking to output a text box or a label on a web page depending on a user's ability to modify data.
For example, my initial thought is that if a user is considered read-only within a system, I want to evaluate this within a custom JSF component and output a label containing data. If the user has "write" access, I want to output an input text box to enable the user to modify the same data.
Is this possible? So far, I've tried dynamically modifying the component type but with no great success. I was just looking at doing the same thing with the renderer type as well.
P.S. I can do this using conditional statements within JSP but I'd like to encapsulate these conditions within a custom tag to reduce the need to write lots of if...else statements in the page.
Any help much appreciated...thanks
Message was edited by:
dfz