cdk


XML Syntax:
     <anyxmlelement xmlns:cdk="http://richfaces.org/cdk/core" />

RichFaces CDK core tags and attributes.

Summary
@* Global attributes of http://richfaces.org/cdk/core namespace
body

Template body marker tag. Should be used only once in template document. Component renderers in JSF define three methods for content rendering, so the following rules are applied for <cc:implementation> part of template document:

  • all content declared before <cdk:body> tag is compiled into statements of encodeBegin(...) method
  • all content declared inside <cdk:body> tag is compiled into statements of encodeChildren(...) method.
  • all content declared before <cdk:body> tag is compiled into statements of encodeEnd(...) method
If there are no compiled statements for one of the aforementioned methods, then definition for this method is not created in the generated file.
If template document doesn't declare <cdk:body> tag, then contents of <cc:implementation> part is compiled into statements of encodeEnd(...) method.

Examples:

The following code snippet:

 ... <cc:implementation> <div id="myId"> <cdk:body> <span>Component content</span> </cdk:body> </div> </cc:implementation> ... 
produces the following code (unsignificant details are ommitted):
 ... encodeBegin(...) { ... writer.startElement("div", cc); writer.writeAttribute("id", "myId", null); } encodeChildren(...) { ... writer.startElement("span", cc); writer.writeText("Component content", null); writer.endlement("span"); } encodeEnd(...) { ... writer.endElement("div"); } ... 


The following code snippet:
 ... <cc:implementation> <div id="myId"> <cdk:body /> </div> </cc:implementation> ... 
produces the following code (unsignificant details are ommitted):
 ... encodeBegin(...) { ... writer.startElement("div", cc); writer.writeAttribute("id", "myId", null); } encodeEnd(...) { ... writer.endElement("div"); } ... 


The following code snippet:
 ... <cc:implementation> <div id="myId"> Some text </div> </cc:implementation> ... 
produces the following code (unsignificant details are ommitted):
 ... encodeEnd(...) { ... writer.startElement("div", cc); writer.writeText("Some text", null); writer.endElement("div"); } ... 

call

Arbitrary method invocation statement. Should be used within cc:implementation element.

Note: method return value is ignored.

class

Fully-qualified name of the generated renderer class.

Should be used within cc:interface element.

component-family

Family of the component to be rendered by this renderer.

Should be used within cc:interface element.

import-attributes

Defines fragment of faces configuration file to import attributes from.

Should be used within cc:interface element.

object

Introduces new variable. Variable's scope is limited to the context of the current method, i.e. variables defined before <cdk:body> are not available after it.

Should be used within cc:implementation element.

Usage example:

  • <cdk:object name="children" type="List" type-arguments="UIComponent" value="#{cc.children}" />

renderer-type

Renderer type identifier for this renderer.

Should be used within cc:interface element.

renderkit-id

ID of the renderkit to include this renderer to. Defaults to 'HTML_BASIC'.

Should be used within cc:interface element.

renders-children

Indicating whether generated renderer is responsible for rendering the children of the component it is asked to render.

Should be used within cc:interface element.

resource-dependencies

Container tag to specify multiple <resource-dependency> tags on a single class.

Should be used within cc:interface element.

resource-dependencyNo Description
root

Root template tag containing cc:interface & cc:implementation tags.

superclass

Fully-qualified name of the renderer superclass.

Should be used within cc:interface element.

 


Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-3 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.