Class Naming Conventions for the Standard Library Structure
The recommended structure of the component library is below. The CDK follows this set of rules during the code-generation phase. By default, the generator expects the following structure for Java classes:
{font:courier new
{font:courier new<prefix>.component.Abstract<Name>}An optional abstract superclass for a JSF component. To avoid manual writing for EL-enabled getters/setters, saveState/restoreState methods, listener-related methods, etc. a developer can create an abstract class, and a generator creates the implementation.
{font:courier new
{font:courier new<prefix>.component.UI<Name>}A Base component class. It can be generated from the abstract superclass or created by a developer.
{font:courier new
{font:courier new<prefix>.component.<markup>.<Markup><RendererName>}A renderer-specific generated component(where the markup is a render-kit specific generation name, such as html | xml | wml). In addition to the UI Component class, it contains Java Bean getter/setter methods for renderer-specific attributes. This class is generated by CDK.
{font:courier new
{font:courier new<prefix>.<Name>}A JSF UI component-type. Can be provided in the configuration or calculated from a component class name.
{font:courier new
{font:courier new<prefix>.<Markup><RendererName>}A renderer-specific JSF component-type. Can be provided in the configuration or calculated from the renderer name.
{font:courier new
{font:courier new<prefix>.renderkit.<RendererName>RendererBase}An optional Renderer superclass, implements methods from template renderer used by generated. Created by a component developer.
{font:courier new
{font:courier new<prefix>.renderkit.<markup>.<RendererName>Renderer}A generated renderer.
{font:courier new
{font:courier new<prefix>.<RendererName>Renderer}A JSF renderer-type. Can be provided in the configuration or calculated from a renderer name.
{font:courier new
{font:courier new<prefix>.<Markup><RendererName>.xml}A template for generating the renderer class. JSPX-like syntax is used. Provided by a component developer.
{font:courier new
{font:courier new<prefix>.taglib.<RendererName>Tag}A JSP tag class.
{font:courier new
{font:courier new<prefix>.taglib.<RendererName>TagHandler}A facelets tag handler class.
{font:courier new
{font:courier new<renderername>}A JSP/Facelets tag name.
For Components Using JSF Events
{font:courier new
{font:courier new<prefix>.event.<Event>Event}An event class. Provided by component a developer.
{font:courier new
{font:courier new<prefix>.event.<Event>Listener}An event listener interface. Can be generated by CDK
{font:courier new
{font:courier newprocess<Event>}An event processing method name in a listener interface.
{font:courier new
{font:courier new<prefix>.event.<Event>Source}An interface for an event processing component ( with methods add<Event>Listener(<Event>Listener listener ) , remove<Event>Listener.... )
{font:courier new
{font:courier new<prefix>.event.<Event>EventWrapper}A wrapper class. Uses for binding listener's EL-expression in user's beans.
{font:courier new
{font:courier new<prefix>.taglib.<Event>ListenerTag}A JSP tag class for a creating listener instance. A parent tag must creates component implementing Source interface.
{font:courier new
{font:courier new<prefix>.taglib.<Event>ListenerTagHandler}A Facelets tag class for creation of listener instance.
Definitions for "Variables" Used Above
<prefix> | A common library name ( for example, base JSF components use <javax.faces> prefix ). Value for prefix get from an abstract component package or a renderer template path. |
<name> | A name for base component ( for UIInput component <name> is "input" ). Value for a component name generator can got from UI... or Abstract... class name. |
<markup> | A render-kit generated a content name, "html" for HTML/XHTML pages, "wml" for mobile content etc. It must be provided in the render-kit description by ant task or maven POM. By default, "html" is used |
<rendererName> | A name of renderer for presenting a visual component implementation, e.g. "commandButton", "panelGroup" etc. A generator can take rendererName from a template file name. |
<event> | A name for Faces Event ( "action" for all ActionSource components like UICommand ). Can be provided in the component configuration, or got from the implemented ...Source interface. |
Comments