Java Server Faces (JSF) uses the facelets and indeed offers the theory of composite components. Composite component is an individual kind of template, which operates as a component in user application. A composite component is comprised of markup tags and various active components. A JSF composite component is reusable and user-generated. It has a personalized, described functionality and it can also contain
(i) validators
(ii) converters
(iii) listeners connected to it like other components.
An XHTML page that has these markup tags and active components can be turned into a composite component.
Functions of the Composite Tags
Provided below is a functional overview of the available composite tags in JSF:
- composite:interface tag describes the subject of a composite component. The composite component can be utilized as an individual component whose attribute set is the combination of the attributes declared in the subject.
- composite:implementation tag describes the composite component implementation. When a composite:interface emerges, then there must be an equivalent composite:implementation.
- composite:attribute tag declares configuration values.attrs tag is used in composite:implementation in order to obtain an attribute described using composite:attribute in composite:interface.
- composite:insertChildren tag is used for inserting child elements inside the composite component tag.
- composite:valueHolder declares that the composite component reveals the functioning of the ValueHolder, which is appropriate to be used as an objective of connected components in the using page.
- composite:editableValueHolder declares that the composite component reveals the functioning of the EditableValueHolder, which is appropriate to be used as an objective of the connected components in the using page.
- composite:actionSource declares that the composite component reveals the functioning of the ActionSource which is appropriate to be used as an objective of the connected components in the using page.
In composite:valueHolder , composite:editableValueHolder and composite:actionSource, the contract of the composite component is declared by the composite:interface , in which these composite components are nested.