6.4.1. < a4j:include > available since 3.0.0

### Create new RichFaces Documentation Jira issue

Summary
255 characters left
Description
Environment
This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.org Community Documentation

- Prev
- Next

### 6.4.1. < a4j:include > available since 3.0.0

expand all

#### 6.4.1.1. Description

The <a4j:include> component is used to include one view as part of another and navigate there using standard JSF navigation.

#### 6.4.1.2. Details of Usage

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.

## Note:

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>

    ...

#### 6.4.1.3. Reference Data

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

#### 6.4.1.4. Relevant Resources Links

Visit the Include page for examples of component usage and their sources.

- Prev6.4. Ajax Output
- Top of page
- Front page
- Next6.4.2. < a4j:mediaOutput > ...