12. JSF Tag Reference
Contents > JSF Tag Reference > JSF Core Tags
10. JSF Core Tag Reference
Contents > JSF Core Tag Reference > f:subview
f:subview |
|
The Subview tag creates a naming container (a container component with a unique identifier) that contains all JavaServer Faces core and custom tags on a nested page via "jsp:include" or any tag that dynamically includes another page from the same web application, such as JSTL's "c:import". The subview tag is basically a wrapper for the JSF components contained in an included JSP page that allows nested views.
Example:
main.jsp
<f:view>
<h1>Page Title</h1>
<p>Lorem ipsum dolor sit amet.</p>
<f:subview id="footer">
<c:import url="footer.jsp" />
</f:subview>
</f:view>
footer.jsp
<f:view>
<hr>
Footer here.
</f:view>
HTML Output
<h1>Page Title</h1>
<p>Lorem ipsum dolor sit amet.</p>
<hr>
<p>Footer here.</p>
|
Tag Attributes
| binding |
String |
| |
| The value-binding expression linking this component tag to a backing bean property. |
| id |
String |
| Required |
| The unique identifier value for this component. The value must be unique within the closest naming container. |
| rendered |
String |
| |
| A value-binding expression that evaluates to a Boolean condition indicating if this component should be rendered. |
|