cc

Tag attribute

Attributes 
NameRequiredTypeDescription
defaultfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)

If this attribute is not required, and a value is not supplied by the page author, use this as the default value.

displayNamefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)

The name to display in a tool palette containing this component. The value of this attribute will be set as the value for this property on the composite component bean descriptor.

expertfalsejakarta.el.ValueExpression
(must evaluate to boolean)

Is this component only for expert users? The value of this attribute will be set as the value for this property on the composite component bean descriptor.

hiddenfalsejakarta.el.ValueExpression
(must evaluate to boolean)

The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans. The value of this attribute will be set as the value for this property on the composite component bean descriptor.

method-signaturefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)

Declares that this attribute must be a MethodExpression whose method signature is described by the value of this attribute. The signature must be described using fully qualified class names wherever a type is required. This attribute is mutually exclusive with the "type" attribute. If both attributes are present, the "method-signature" attribute is ignored.

Provides the signature of the Java method. The syntax of the method-signature element is as follows (taken from function-signature in web-jsptaglibrary_2_1.xsd):

MethodSignature ::= ReturnType S MethodName S? '(' S? Parameters? S? ')'

ReturnType ::= Type

MethodName ::= Identifier

Parameters ::= Parameter | ( Parameter S? ',' S? Parameters )

Parameter ::= Type

Where:

  • Type is a basic type or a fully qualified Java class name (including package name), as per the 'Type' production in the Java Language Specification, Second Edition, Chapter 18.

  • Identifier is a Java identifier, as per the 'Identifier' production in the Java Language Specification, Second Edition, Chapter 18.

Example:

java.lang.String nickName( java.lang.String, int )

nametruejakarta.el.ValueExpression
(must evaluate to java.lang.String)

The name of the attribute as it must appear on the composite component tag in the using page. If the value of the name attribute is equal to (without the quotes) “action”, “actionListener”, “validator”, or “valueChangeListener”, the action described in ViewHandler.retargetMethodExpressions() must be taken to handle the attribute. In these cases, the method-signature attribute, if present, must be ignored as its value is derived as described in retargetMethodExpressions().

preferredfalsejakarta.el.ValueExpression
(must evaluate to boolean)

Is this a "preferred" component. The value of this attribute will be set as the value for this property on the composite component bean descriptor.

requiredfalsejakarta.el.ValueExpression
(must evaluate to boolean)

True if the page author must supply a value for this attribute. The default value is false.

shortDescriptionfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)

A short description of the purpose of this component. The value of this attribute will be set as the value for this property on the composite component bean descriptor.

targetAttributeName false jakarta.el.ValueExpression
(must evaluate to java.lang.String )

This attribute allows the name of the attribute exposed to the using page to differ from the one actually used in the implementation. For example, consider a composite component that contains two buttons, one that means "submit" and one that means "cancel". It is natural to want to declare two composite component attributes to allow these buttons to be customized, for example, "submitAction" and "cancelAction". For both of these buttons, the method expression should be retargeted to the inner button's "action" attribute. This scenario would be expressed as follows.

<cc:interface>
  <cc:attribute name="submitAction" targetAttributeName="action"
                method-signature="java.lang.Object action()"/>
  <cc:attribute name="cancelAction" targetAttributeName="action"
                method-signature="java.lang.Object action()"/>
  <cc:actionSource name="submitAction"/>
  <cc:actionSource name="cancelAction"/>
</cc:interface>
<cc:implementation>
  <h:commandButton id="submitAction" value="submit" />
  <h:commandButton id="cancelAction" value="cancel" />
</cc:implementation>
targetsfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)

If this element has a method-signature attribute, the value of the targets attribute must be interpreted as a space (not tab) separated list of client ids (relative to the top level component) of components within the <composite:implementation> section. Space is used as the delimiter for compatibility with the IDREFS and NMTOKENS data types from the XML Schema. Each entry in the list must be interpreted as the id of an inner component to which the MethodExpression from the composite component tag in the using page must be applied. If this element has a method-signature attribute, but no targets attribute, the value of the name attribute is used as the single entry in the list. If the value of the name attribute is not one of the special values listed in the description of the name attribute, targets (or its derived value) need not correspond to the id of an inner component.

typefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)

Declares that this attribute must be a ValueExpression whose expected type is given by the value of this attribute. If not specified, and no "method-signature" attribute is present, java.lang.Object is assumed. This attribute is mutually exclusive with the "method-signature" attribute. If both attributes are present, the "method-signature" attribute is ignored.