| |||||||
FRAMES NO FRAMES |
This element declares the usage contract for a composite component. Optionally, and at the component author's discretion, this contract exposes the features of one or more inner components to the page author. The page author can work with the composite component as a single component whose feature set is the union of the features declared in the usage contract.
For example, consider a composite component that implements the functionality of a "login panel". Such a component would likely have two text fields and one button. The user of such a component might like to do one or more of the following.
Be able to listen for the ActionEvent
on the button.
In this case, a <composite:actionSource>
element is included in the usage contract that refers to the inner button in the <composite:implementation>
section.
Provide an "action" to invoke when the button is pressed.
In this case, a <composite:attribute>
element is included in the usage contract that refers to the inner button in the <composite:implementation>
section and declares the proper method signature for an "action".
Provide parameters to the composite component for labels and other rendering specific aspects of the composite component.
In this case, one or more <composite:attribute>
elements are included in the usage contract and those parameters are referred to in the <composite:implementation>
section using EL expressions like #{compositeComponent.attrs.usernameLabel}
, assuming usernameLabel
is the name
of one of the <composite:attribute>
elements in the usage contract.
Add ValueChangeListener
s, Converter
s, or Validator
s to either or both text fields.
In this case, a <composite:editableValueHolder>
element is included in the usage contract that refers to the inner text field in the <composite:implementation>
section. In the case of wanting to enable only adding a Converter
(and not a ValueChangeListener
or Validator
, a <composite:valueHolder>
element would be used.
Add facet children to the login panel.
In this case, a <composite:facet>
element is included in the usage contract that refers to the inner <composite:insertFacet>
element in the <composite:implementation>
section.
For each of the behaviorial interfaces in Section 3.2 of the specification, there is a tag in the composite:
library to nest inside of the <composite:interface>
section.
If the <composite:interface>
section is not present in a PDL page, the contract will be inferred as described in the specification. There must be zero or one of these elements in a composite component PDL file. If a <composite:interface>
element does appear, there must be an accompanying <composite:implementation>
element in the same PDL file.
Tag Information | |
Tag Class | None |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes | ||||
Name | Required | Request-time | Type | Description |
name | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The name of this composite component. Advisory only. The real name is taken from the filename. The value of this attribute will be set as the value for this property on the composite component bean descriptor. |
componentType | false | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The |
displayName | false | false | javax.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. |
preferred | false | false | javax.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. |
expert | false | false | javax.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. |
shortDescription | false | false | javax.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. |
Variables | No Variables Defined. |
| |||||||
FRAMES NO FRAMES |