Java Platform, Enterprise Edition (Java EE) 8
The Java EE Tutorial
You can apply the following steps while developing your own custom component.
Create a custom component class that does the following:
getFamily method to return the component family,
which is used to look up renderers that can render the component
Includes the rendering code or delegates it to a renderer (explained in Step 2)
Enables component attributes to accept expressions
Queues an event on the component if the component generates events
Saves and restores the component state
Delegate rendering to a renderer if your component does not handle the rendering. To do this:
Create a custom renderer class by extending
Register the renderer to a render kit.
Register the component.
Create an event handler if your component generates events.
Create a tag library descriptor (TLD) that defines the custom tag.