This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I want to create a custom version of UIInput (aka h:inputText) which will render normally as a UIInput EXCEPT when the tag has disabled="true"; in that case it will then render as an output field with an appropriate CSS style. Is this possible?
It was the java code for the JSF custom tag I was asking about. After all, this is a JSF forum, right?
Tags that are totally standalone and have simple attributes are easy - I have done many. But when you want to make a specific change in the behaviour of a single attribute of the existing standard h:inputText tag, it becomes far more difficult, if not impossible. See my recent posts on the IBM Developerworks JSF forum as well as the replies from the IBM folks.
Oh, and another thing, that CSS example doesn't work with IE, it shows up illegible with a RED background. And that is EXACTLY why I want to change the behavior of the tag so it outputs a styled string instead of an input field when disabled="true".
Agreed. I very much like Facelets, particularly the template capability. However, my customer may see it in a different way - a switch from vanilla JSF to Facelets is a whole new technology, therefore somewhat more disruptive. Custom components are less so, partly because they already have several of them, in fact the entire page/menu system for these 200 JSPs is based on a custom tag I wrote that all the JSPs use through a template, plus they make widespread use of converters.