Java Reference
In-Depth Information
A Renderer is a helper to the UIComponent that deals with how that specific
UIComponent class should appear in a specific kind of client device. Like components,
renderers are identified by two names: render-kit-id and renderer-type . A
render kit is just a bucket into which a particular group of renderers is placed, and
the render-kit-id identifies the group. Most JavaServer Faces component libraries
provide their own render kits.
A javax.faces.view.facelets.Tag object is a helper to the UIComponent
and Renderer that allows the page author to include an instance of a UIComponent in
a JavaServer Faces view. A tag represents a specific combination of component-type
and renderer-type .
See “ Component, Renderer, and Tag Combinations on page 99 for information on how
components, renderers, and tags interact.
This chapter uses the image map component from the Duke's Bookstore case study ex-
ample to explain how you can create simple custom components, custom renderers, and
associated custom tags, and take care of all the other details associated with using the com-
ponents and renderers in an application. See Chapter 25 , Duke's Bookstore Case Study
Example , ” for more information about this example.
The chapter also describes how to create other custom objects: custom converters, custom
listeners, and custom validators. It also describes how to bind component values and in-
stances to data objects and how to bind custom objects to managed bean properties.
The following topics are addressed here:
• “ Determining Whether You Need a Custom Component or Renderer ” on page 97
• “ Understanding the Image Map Example on page 100
• “ Steps for Creating a Custom Component on page 105
• “ Creating Custom Component Classes on page 106
• “ Delegating Rendering to a Renderer on page 114
• “ Implementing an Event Listener on page 117
• “ Handling Events for Custom Components ” on page 119
• “ Defining the Custom Component Tag in a Tag Library Descriptor on page 120
• “ Using a Custom Component ” on page 121
• “ Creating and Using a Custom Converter on page 123
• “ Creating and Using a Custom Validator on page 128
Search WWH ::




Custom Search