Tuesday, March 24, 2009

JSF Renderers

Each of the JSF tag gives rise to an associated component.
A renderer is a type of class that is responsible for encoding and decoding components.

Encoding:

For example: Suppose we have used h:inputText tag . So the renderer of the component associated with this tag produces the following output:

<input type=”text” name=”ID” value=”current_value”/>


Additional User-Interface Component Libraries

Because of the richness and flexibility of the JSF API, many Java developers are beginning to create new JSF Component libraries and implementations. Oracle's ADF Faces is a fully compliant JSF component library which offers a broad set of enhanced UI Components for JSF application development. These include multiple renderers per client type, advanced tables, color and date pickers along with a host of general components such as menus, command buttons, shuttle choosers and progress meters.

MyFaces is an example of a new JSF UI Component Library being offered as an Open Source project through Apache. Myfaces also serves as an enhancement to the JSF base UI components in that they also have more extensive UI capabilities such as integrated Tiles support, Javascript enabled menus and Tree controls.


Writing JSF components can be a difficult task, but using them is as simple as a call to a tag. And that is exactly the strength and coolness of Faces.

No comments:

Post a Comment