Java Reference
In-Depth Information
<display-name>Next</display-name>
<facet-name>next</facet-name>
</facet>
If a component that supports facets provides its own rendering and you want to include
facet elements in the application configuration resource file, you need to put them in
the component's configuration rather than the renderer's configuration.
Registering a Custom Component
In addition to registering custom renderers (as explained in the preceding section), you
also must register the custom components that are usually associated with the custom ren-
derers. You use either a @FacesComponent annotation, as described in “ Creating Cus-
tom Component Classes ” on page 106 , or the component element of the application
configuration resource file.
Here is a hypothetical component element from the application configuration resource
file that registers AreaComponent :
Click here to view code image
<component>
<component-type>DemoArea</component-type>
<component-class>
dukesbookstore.components.AreaComponent
</component-class>
<property>
<property-name>alt</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<property-name>coords</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<property-name>shape</property-name>
<property-class>java.lang.String</property-class>
</property>
</component>
Attributes specified in a component tag override any settings in the @FacesCompon-
ent annotation.
The component-type element indicates the name under which the component should
be registered. Other objects referring to this component use this name. For example, the
Search WWH ::




Custom Search