Author: cluts
Date: 2009-03-30 07:14:31 -0400 (Mon, 30 Mar 2009)
New Revision: 13288
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
RF-6582 - described "rowKeyConverter".
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-03-30 11:11:45 UTC
(rev 13287)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-03-30 11:14:31 UTC
(rev 13288)
@@ -128,41 +128,41 @@
Data property of the current model <code>TreeNode</code> is
exposed using
<emphasis><property>"var"</property></emphasis>
attribute,
so if <code>var="station"</code> you can
refer to that data using <code>#{station}</code> syntax.
- </para>
- <para>
- In the following example the <emphasis
role="bold"><property><rich:tree></property></emphasis>
is
- built from a simple <code>org.richfaces.model.TreeNode</code>
model:
- </para>
- <programlisting role="JAVA"><![CDATA[...
-private TreeNodeImpl<String> stationRoot = new TreeNodeImpl<String>();
-private TreeNodeImpl<String> stationNodes = new TreeNodeImpl<String>();
-private String[] kickRadioFeed = { "Hall & Oates - Kiss On My List",
- "David Bowie - Let's Dance", "Lyn Collins - Think (About It)",
- "Kim Carnes - Bette Davis Eyes",
- "KC & the Sunshine Band - Give It Up" };
- ...
-stationRoot.setData("KickRadio");
-stationNodes.addChild(0, stationRoot);
-for (int i = 0; i < kickRadioFeed.length; i++){
- TreeNodeImpl<String> child = new TreeNodeImpl<String>();
- child.setData(kickRadioFeed[i]);
- stationRoot.addChild(i, child);
+ </para>
+ <para>
+ In the following example the <emphasis
role="bold"><property><rich:tree></property></emphasis>
is
+ built from a simple <code>org.richfaces.model.TreeNode</code>
model:
+ </para>
+ <programlisting role="JAVA"><![CDATA[...
+private TreeNodeImpl<String> stationRoot = new TreeNodeImpl<String>();
+private TreeNodeImpl<String> stationNodes = new TreeNodeImpl<String>();
+private String[] kickRadioFeed = { "Hall & Oates - Kiss On My List",
+ "David Bowie - Let's Dance", "Lyn Collins - Think (About It)",
+ "Kim Carnes - Bette Davis Eyes",
+ "KC & the Sunshine Band - Give It Up" };
+ ...
+stationRoot.setData("KickRadio");
+stationNodes.addChild(0, stationRoot);
+for (int i = 0; i < kickRadioFeed.length; i++){
+ TreeNodeImpl<String> child = new TreeNodeImpl<String>();
+ child.setData(kickRadioFeed[i]);
+ stationRoot.addChild(i, child);
}
-...]]></programlisting>
-<para>
-As it is mentioned before you need to pass
<code>#{stations.stationNodes}</code> property to the
-<emphasis><property>"value"</property></emphasis>
attribute
-and define the
<emphasis><property>"var"</property></emphasis>
attribute in order to refer to the data:
-</para>
-<programlisting role="XML"><![CDATA[...
-<rich:tree value="#{stations.stationNodes}" var="station">
- <rich:treeNode>
- <h:outputText value="#{station}" />
- </rich:treeNode>
+...]]></programlisting>
+<para>
+As it is mentioned before you need to pass
<code>#{stations.stationNodes}</code> property to the
+<emphasis><property>"value"</property></emphasis>
attribute
+and define the
<emphasis><property>"var"</property></emphasis>
attribute in order to refer to the data:
+</para>
+<programlisting role="XML"><![CDATA[...
+<rich:tree value="#{stations.stationNodes}" var="station">
+ <rich:treeNode>
+ <h:outputText value="#{station}" />
+ </rich:treeNode>
</rich:tree>
-...]]></programlisting>
-<para>
- This is a result:
+...]]></programlisting>
+<para>
+ This is a result:
</para>
<figure>
<title>A simple <emphasis
role="bold"><property><rich:tree></property></emphasis>
from a <code>org.richfaces.model.TreeNode</code></title>
@@ -171,11 +171,11 @@
<imagedata fileref="images/treeModel.png"/>
</imageobject>
</mediaobject>
-</figure>
+</figure>
-<para>
-Implementation of the <emphasis
role="bold"><property><rich:tree></property></emphasis>
component
-provides another way to build a tree.
+<para>
+Implementation of the <emphasis
role="bold"><property><rich:tree></property></emphasis>
component
+provides another way to build a tree.
This approach implies using a
<code>"XmlTreeDataBuilder"</code> class
(<ulink
url="http://labs.jboss.com/file-access/default/members/jbossrichface...
org.richfaces.component.xml.XmlTreeDataBuilder
@@ -522,7 +522,7 @@
<property>"process"</property>
</emphasis> attribute usage you can find <link
linkend="process"
here</link>. </para>
-
<tip>
+ <!--<tip>
<title>Tip:</title>
<para>
<emphasis>
@@ -530,7 +530,24 @@
</emphasis> support for the <emphasis
role="bold">
<property><rich:tree></property>
</emphasis> is pending! </para>
- </tip>
+ </tip>-->
+ <para>
+ The value of <emphasis>
+
<property>"rowKeyConverter"</property>
+ </emphasis> can be:
+ </para>
+ <itemizedlist>
+ <listitem>
+
<para><code>org.richfaces.TreeRowKeyConverter</code> - it used for the
simple tree.</para>
+ </listitem>
+ <listitem>
+
<para><code>org.richfaces.TreeAdaptorRowKeyConverter</code> used for
tree with <emphasis
role="bold"><property><rich:treeNodesAdaptor></property></emphasis></para>
+ </listitem>
+ <listitem>
+ <para>The
<code>org.richfaces.TreeAdaptorIntegerRowKeyConverter</code> converter used
for adaptor-based tree for implementing custom converters</para>
+ </listitem>
+ </itemizedlist>
+
</section>
<section id="tsebro" role="updated">