<?xml version='1.0' encoding='UTF-8'?>
<section>
  <sectioninfo>
    <keywordset>
      <keyword>treeNodesAdaptor</keyword>
      <keyword>rich:treeNodesAdaptor</keyword>
      <keyword>HtmltreeNodesAdaptor</keyword>
    </keywordset>
  </sectioninfo>

  <table>
    <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.richfaces.TreeNodesAdaptor</entry>
        </row>
        <row>
          <entry>component-class</entry>
          <entry>org.richfaces.component.html.HtmlTreeNodesAdaptor</entry>
        </row>
        <row>
          <entry>component-family</entry>
          <entry>org.richfaces.TreeNodesAdaptor</entry>
        </row>
        <!--
		<row>
          <entry>renderer-type</entry>
          <entry>org.richfaces.EffectRenderer</entry>
        </row>
		-->
        <row>
          <entry>tag-class</entry>
          <entry>org.richfaces.taglib.TreeNodesAdaptorTag</entry>
        </row>
      </tbody>
    </tgroup>
  </table>

  <section>
    <title>Creating the Component with a Page Tag</title>
    <para>To create the simplest variant of <property>rich:treeNodesAdaptor</property> on a page, use the
      following syntax:</para>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[...
<rich:treeNodesAdaptor var="issue" nodes="#{model.issues}">
	...
	<rich:treeNode>
		<!-- node content -->							
	</rich:treeNode>
	... 
	<!-- Others nodes -->							
	...
</rich:treeNodesAdaptor>
...
]]></programlisting>
  </section>

  <section>
    <title>Creating the Component Dynamically Using Java</title>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlTreeNodesAdaptor;
...
HtmlTreeNodesAdaptor myTreeNodesAdaptor = new HtmlTreeNodesAdaptor();
...
]]></programlisting>
  </section>

  <section>
    <title>Details of Usage</title>
    <para>
      <emphasis role="bold">The typical variant of using:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[...
	<rich:tree adviseNodeOpened="#{treeModelBean.adviseNodeOpened}" switchType="client">
		<rich:treeNodesAdaptor id="project" nodes="#{loaderBean.projects}" var="project">
			<rich:treeNode>
				<h:commandLink action="#{project.click}" value="Project: #{project.name}" />
			</rich:treeNode>
			<rich:treeNodesAdaptor id="srcDir" var="srcDir" nodes="#{project.srcDirs}">
				<rich:treeNode>
					<h:commandLink action="#{srcDir.click}" value="Source directory: #{srcDir.name}" />
				</rich:treeNode>
				<rich:treeNodesAdaptor id="pkg" var="pkg" nodes="#{srcDir.packages}">
					<rich:treeNode>
						<h:commandLink action="#{pkg.click}" value="Package: #{pkg.name}" />
					</rich:treeNode>
					<rich:treeNodesAdaptor id="class" var="class" nodes="#{pkg.classes}">
						<rich:treeNode>
							<h:commandLink action="#{class.click}" value="Class: #{class.name}" />
						</rich:treeNode>
					</rich:treeNodesAdaptor>	
				</rich:treeNodesAdaptor>
			</rich:treeNodesAdaptor>
		</rich:treeNodesAdaptor>
	</rich:tree>
...
]]></programlisting>

 </section>
</section>
