background image

Fully-Qualified Class Name

<< Releasing Resources | Configuring JavaServer Faces Applications >>
<< Releasing Resources | Configuring JavaServer Faces Applications >>

Fully-Qualified Class Name

javax.faces.component.UIComponent
</type>
</deferred-value>
</attribute>
<attribute>
<name>current</name>
<required>false</required>
<deferred-value>
<type>
java.lang.String
</type>
</deferred-value>
</attribute>
...
<attribute>
<name>actionListener</name>
<required>false</required>
<deferred-method>
<method-signature>
void actionListener(javax.faces.event.ActionEvent)
</method-signature>
</deferred-method>
<type>String</type>
</attribute>
...
</tag>
At a minimum, each tag must have a name (the name of the tag) and a tag-class attribute,
which specifies the fully-qualified class name of the tag handler.
Each attribute element defines one of the tag attributes. As described in
"Defining a Tag
Attribute Type" on page 156
, the attribute element must define what kind of value the attribute
accepts, which for JavaServer Faces tags is either a deferred value expression or a method
expression.
To specify that an attribute accepts a deferred value expression, you define the type that the
corresponding component property accepts using a type element nested inside of a
deferred-value
element, as shown for the binding and current attribute definitions in the
preceding code snippet.
To specify that an attribute accepts a method expression, you define the signature of the method
that expression references using a method-signature element nested inside a
deferred-method
element, as shown by the actionListener attribute definition in the
preceding code snippet. The actual name of the method is ignored by the runtime.
For more information on defining tags in a TLD, consult the
"Tag Library Descriptors" on
page 247
section of this tutorial.
Defining the Custom Component Tag in a Tag Library Descriptor
Chapter 13 · Creating Custom UI Components
435