Steps for Creating a Custom Component

Before we describe how the image map works, it helps to summarize the basic steps for creating an application that uses custom components. You can apply the following steps while developing your own custom component.

1.
Write a tag handler class that extends javax.faces.webapp.UIComponentTag. In this class, you need a getRendererType method, which returns the type of your custom renderer if you are using one (explained in step 4); a getComponentType method, which returns the type of the custom component; and a setProperties method, in which you set all the new attributes of your component
2.
Create a tag library descriptor (TLD) that defines the custom tag.
3.
Create a custom component class
4.
Include the ...

Get The J2EE™ Tutorial Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.