Java Reference
In-Depth Information
Listing 6-7. ui:composition Tag
<ui:composition template="optional">
The
optional
attribute declares a template to which the enclosed content should be applied using
the
template
attribute.
ui:decorate
The difference between the
ui:decorate
tag and the
ui:composition
tag is that, unlike
ui:composition
,
ui:decorate
causes surrounding content to be included in the page as well. Listing
6-8 illustrates the syntax of
ui:decorate
.
Listing 6-8. ui:decorate Tag
<ui:decorate template="required">
ui:define
The
ui:define
tag is used inside a
ui:composition
tag in template client files to define a region
that will be inserted into the composition at the point provided by the
ui:insert
tag. Listing 6-9
illustrates the syntax of
ui:define
.
Listing 6-9. ui:define Tag
<ui:define name="required">
ui:insert
The
ui:insert
tag is used in the template files to indicate where the
ui:define
in the template client
should be inserted. Listing 6-10 illustrates the syntax of
ui:insert
.
Listing 6-10. ui:insert Tag
<ui:insert name="optional">
If no name is specified, the content in the body of the
ui:insert
tag is added to the view.
ui:include
The
ui:include
can be used in the template files or template client files. Listing 6-11 illustrates the
syntax of
ui:include
.
Listing 6-11. ui:include Tag
<ui:include src="required">