a4j:include

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

## Creating on a page

To use the component, it's necessary to place the following strings on a page:

Example:

    <h:panelGroup id="wizard">
    		<a4j:include  viewId="/pages/include/first.xhtml" />
    </h:panelGroup>

For navigation inside a page defined in viewId any components responsible for Ajax requests to the server generation are used.

For example, the following component on a page `"/pages/include/first.xhtml"`

Example:

    ...
    <a4j:commandButton action="next" reRender="wizard"/>
    ...

And in faces-config it's defined:

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>

In this case after a click on a button defined inside `"first.xhtml"` view, navigation is performed after an Ajax request (the same as standard JSF one) only inside this view.

## Creating the Component Dynamically Using Java

This component cannot be created dynamically.

## Relevant resources links

On the component LiveDemo page you can see the example of <a4j:include> usage and sources for the given example.

Some additional information can be found on the Ajax4Jsf Users Forum.