Previous Section  < Day Day Up >  Next Section

<render-kit>

The <render-kit> element declares a custom render kit or additional custom renderers for the default kit.

Syntax

<render-kit>

  [<description [xml:lang="lang"]>description</description>]*

  [<display-name [xml:lang="lang"]>displayName</display-name>]*

  [<icon [xml:lang="lang"]>

     [<small-icon>iconPath</small-icon>]

     [<large-icon>iconPath</large-icon>]

   </icon>]*

  [<render-kit-id>renderKitId</render-kit-id>]

  [<render-kit-class>className</render-kit-class>]

  [<renderer>

    [<description [xml:lang="lang"]>description</description>]*

    [<display-name [xml:lang="lang"]>displayName</display-name>]*

    [<icon [xml:lang="lang"]>

       [<small-icon>iconPath</small-icon>]

       [<large-icon>iconPath</large-icon>]

     </icon>]*

    <component-family>componentFamily</component-family>

    <renderer-type>rendererType</renderer-type>

    <renderer-class>className</renderer-class>

    [<attribute>

      [<description [xml:lang="lang"]>description</description>]*

      [<display-name [xml:lang="lang"]>displayName</display-name>]*

      [<icon [xml:lang="lang"]>

         [<small-icon>iconPath</small-icon>]

         [<large-icon>iconPath</large-icon>]

       </icon>]*

       <attribute-name>attrName</attribute-name>

       <attribute-class>className</attribute-class>

       [<default-value>defaultValue</default-value>]

       [<suggested-value>suggestedValue</suggested-value>]

       [<attribute-extension>extension</attribute-extension>]*

     </attribute>]*

    [<renderer-extension>rendererExtension</renderer-extension>]*

   </renderer>]*

</render-kit>

The <render-kit-id> declares an identifier for a custom kit, and the <render-kit-class> element declares a custom javax.faces.render.RenderKit class for the kit. If omitted, the renderer declarations apply to the default HTML basic render kit.

Each renderer is declared by a <renderer> element, with nested <component-family>, <renderer-type>, and <renderer-class> elements mapping an implementation class to the combination of the component family and renderer type (see Chapter 13 for details).

<render-kit>

  <renderer>

    <component-family>com.mycompany.MyComponent</component-family>

    <renderer-type>com.mycompany.MyRenderer</renderer-type>

    <renderer-class>

      com.mycompany.jsf.MyComponetRenderer

    </renderer-class>

  </renderer>

</render-kit>

The <attribute> element provide information about the component's generic attributes used by the renderer, which may be used by a development tool to help a developer use the renderer, the same way for the <component> element.

    Previous Section  < Day Day Up >  Next Section