JBoss.orgCommunity Documentation
The <a4j:include> component is used to include one view as part of another and navigate there using standard JSF navigation.
The component is used to include one view as part of another and may be put anywhere in the page code. The 'viewID' attribute is used to point at the part to be included and should present a full context-relative path of the resource in order to be used as from-view and to-view in the JSF navigation cases. In general the component functions as Fecelets <ui:include> tag but with partial page navigation in Ajax mode as an advantage.
To make the RichFaces <a4j:include> component (as well as Facelets <ui:include> tag) work properly when including the part of the page check that included page does not generates extra HTML <!DOCTYPE>, <html>, <body> tags.
The navigation rules could look as following:
Example:
...
<navigation-rule>
<from-view-id>/pages/include/first.xhtml</from-view-id>
<navigation-case>
<from-outcome>next</from-outcome>
<to-view-id>/pages/include/second.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
...
Table of <a4j:include> attributes.
Table 6.22. Component Identification Parameters
Name | Value |
---|---|
component-type | org.ajax4jsf.Include |
component-family | javax.faces.Output |
component-class | org.ajax4jsf.component.html.Include |
renderer-type | org.ajax4jsf.components.AjaxIncludeRenderer |
Visit the Include page for examples of component usage and their sources.