In JSF, Is there a way to extend one of the current components capabilities without rewriting the whole component. For example, say I wanted to add some new elements to a textbox but I didn't want to rewrite an entirely new textbox object. Can anyone provide me with examples of how this would be done. I have done it before in dot.net with relative ease. Any help would be greatly appreciated.
I think someone asked this same question a month or 2 back, so you might want to search the forums.
Short answer: JSF objects are subclassable, so yes, you can extend them. However you'll have to define a new tag and associated TLD to associate this newly-enhanced object type with appropriate descriptions of its capabilities.
Sources may include data from the Fakebook Research Foundation with support from Gargle University
Yeah, I searched through some of the examples on this site but none really answered the question. Suppose I wanted to extend the textbox tag in the following manner : <h:inputText id="name" attribute1="value1" attribute2="value2" value="Hello world"/>. In this example, attribute1 and attribute2 are not standard attributes. What all needs to change to make something like this work? The rendered, the actual class that represents this tag behind the scenes. I guess I am looking for a definitive example or set of steps to take to achieve this goal.