10. Facelets UI Tag Reference
Contents > Facelets UI Tag Reference > ui:define
ui:define |
|
The Define tag is a templating tag that defines named content to be inserted into a template. The name attribute value must match that of a ui:insert tag in the target template for the named content to be included.
Example:
<h:outputText value="#{dateBean.today}">
<s:convertDateTime dateStyle="full" type="both" />
</h:outputText>
<p><strong>template.jsf</strong></p>
<h2><ui:insert name="title" /></h2>
<p><strong>template.jsf</strong></p>
<ui:composition template="template.jsf">
<ui:define name="title">Hello World!</ui:define>
</ui:composition>
HTML Output
<p><strong>composition.jsf</strong></p>
<h2>Hello World!</h2>
|
Tag Attributes
| name |
String |
| Required |
| The name attribute specifies the literal name of the definition and must match the name of a ui:insert tag in a target template for the content to be included in that template. |
|