Srinivasa Murari wrote:I am new to JSF, looking for steps how to create Custom Tomahawk JSF tag.
Thanks
Sri
Preferably, you need a set of classes, and TLD (Tag Library Descriptor Class) and a faces-config XML file for your component.
In my own custom components I usually end up with classes like
MyComponentName - A Component class that extends UICommand, and at the least overrides the methods getFamily, processDecodes and getRendersChildren
MyComponentNameTag - A Component class that is responsible for setting and storing all the attributed that the component has
MyComponentRenderer - A Component class that is responsible for rendering the HTML/JavaScript/XML/etc of your component
MyComponent.tld - A Tag Library Descriptor file that describes the component, each and every attribute, its type and purpose (this is sort of like an XML representation of the *Tag class above)
faces-config.xml - The librarys configfile that tells JSF how to weave the classes above together into a component
Then you have other options as well, such as including a *-taglib.xml file so that Facelets can understand the component, etc.
However, if creating components is all new to you, you should read up on it. JSF in Action is a very decent book. The Sun JSF tutorial (Part of the JEE tutorial) is also quite good (IMO), and is the guide from which I learned to write Custom Components.
Its rather hard for anyone on the forum to be specific for your needs, just because you are asking a very wide quiestion, to which there are many different approaches and possible solutions to. There is also a rather decent learning curve involved.