<?xml version='1.0' encoding='UTF-8'?>
<chapter>
  <chapterinfo>
    <keywordset>
      <keyword>a4j:include</keyword>
    </keywordset>
  </chapterinfo>
     <table frame="all">
         <title>Component identification parameters</title>
        <tgroup cols="2">
	  <thead>
            <row>
                <entry>Name</entry>
                <entry>Value</entry>
            </row>
        </thead>
          <tbody>
            <row>
              <entry>component-type</entry>
              <entry>org.ajax4jsf.Include</entry>
            </row>
            <row>
              <entry>component-family</entry>
              <entry>javax.faces.Output</entry>
            </row>
            <row>
              <entry>component-class</entry>
              <entry>org.ajax4jsf.component.html.Include</entry>
            </row>
            <row>
              <entry>renderer-type</entry>
              <entry>org.ajax4jsf.components.AjaxIncludeRenderer</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
  
  <section>
    <title>Creating on a page</title>
    <para>To use the component, it&apos;s necessary to place the following strings on a page:</para>

  <para>
      <emphasis role="bold">Example:</emphasis>
 </para>
     <programlisting role="XML"><![CDATA[<h:panelGroup id="wizard">
		<a4j:include  viewId="/pages/include/first.xhtml" />
</h:panelGroup>
]]></programlisting>
<para>For navigation inside a page defined in viewId any components responsible for Ajax requests to the server generation are used.</para>
<para>For example, the following component on a page <code>&quot;/pages/include/first.xhtml&quot;</code></para>

  <para>
      <emphasis role="bold">Example:</emphasis>
 </para>
<programlisting role="XML"><![CDATA[...
<a4j:commandButton action="next" reRender="wizard"/>
...
]]></programlisting>
<para>And in faces-config it&apos;s defined:</para>

  <para>
      <emphasis role="bold">Example:</emphasis>
 </para>
<programlisting role="XML"><![CDATA[<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>
]]></programlisting>
<para>In this case after a click on a button defined inside <code>&quot;first.xhtml&quot;</code> view, navigation is performed after an Ajax request (the same as standard JSF one) only inside this view.</para>
 </section>
  <section>
    <title>Creating the Component Dynamically Using Java</title>
    <para>
      This component cannot be created dynamically. 
    </para>
</section>

  <section>
    <title>Relevant resources links</title>
    <para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/include.jsf?c=include"
      >On the component LiveDemo page</ulink> you can see the example of <emphasis role="bold"
        ><property>&lt;a4j:include&gt;</property></emphasis> usage and sources for the given example. </para>
	<para> 
	Some additional information can be found on the <ulink url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104158">Ajax4Jsf Users Forum</ulink>.
	</para><!--
	To see how component works on practice, look at a4j-include example from 
	<ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/include.jsf?c=include">RichFaces Live Demo</ulink>.	 -->
  </section>
</chapter>