Author: ochikvina
Date: 2009-04-29 05:09:17 -0400 (Wed, 29 Apr 2009)
New Revision: 13892
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
https://jira.jboss.org/jira/browse/RF-6582 - adding the description of the tree converters
and the example into the 'Details of usage' section.
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-04-29 08:22:23 UTC
(rev 13891)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-04-29 09:09:17 UTC
(rev 13892)
@@ -46,13 +46,13 @@
<title>Creating the Component with a Page Tag</title>
<para>There are two ways to set up a tree</para>
<itemizedlist>
- <listitem>
- <para>Using model
(<code>org.richfaces.model.TreeNode</code> or
<code>javax.swing.tree.TreeNode</code>)
-</para>
- <para>
- <emphasis
role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <listitem>
+ <para>Using model
(<code>org.richfaces.model.TreeNode</code>
+ or
<code>javax.swing.tree.TreeNode</code>) </para>
+ <para>
+ <emphasis
role="bold">Example:</emphasis>
+ </para>
+ <programlisting
role="XML"><![CDATA[...
<rich:tree value="#{library.data}" var="item" >
<rich:treeNode icon="/images/tree/singer.png" >
<h:outputText value="#{item.name}" />
@@ -61,21 +61,22 @@
</rich:tree>
...]]></programlisting>
- </listitem>
- <listitem>
- <para>
- Using model tags <emphasis
role="bold"><property><rich:recursiveTreeNodesAdaptor></property></emphasis>,
- <emphasis
role="bold"><property><rich:treeNodesAdaptor></property></emphasis>.
- </para>
- <para>
- <emphasis
role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ </listitem>
+ <listitem>
+ <para> Using model tags <emphasis
role="bold">
+
<property><rich:recursiveTreeNodesAdaptor></property>
+ </emphasis>, <emphasis
role="bold">
+
<property><rich:treeNodesAdaptor></property>
+ </emphasis>. </para>
+ <para>
+ <emphasis
role="bold">Example:</emphasis>
+ </para>
+ <programlisting
role="XML"><![CDATA[...
<rich:tree>
<rich:recursiveTreeNodesAdaptor roots="#{fileSystemBean.sourceRoots}"
var="item" nodes="#{item.nodes}" />
</rich:tree>
...]]></programlisting>
- </listitem>
+ </listitem>
</itemizedlist>
</section>
<section>
@@ -89,51 +90,55 @@
HtmlTree myTree = new HtmlTree();
...]]></programlisting>
</section>
-
+
<section>
<title>Details of Usage</title>
- <para>
- As it has been mentioned
- <link linkend="tree">above</link>
- the
- <emphasis role="bold">
- <property><rich:tree></property></emphasis> component
- allows rendering any tree-like data model.
- </para>
- <para>
- You can build your <emphasis
role="bold"><property><rich:tree></property></emphasis>
- using model (<code>org.richfaces.model.TreeNode</code> or
<code>javax.swing.tree.TreeNode</code>).
- In this case the <emphasis
role="bold"><property><rich:tree></property></emphasis>
component
- interacts with data model via
<code>"TreeNode"</code> interface
-(<ulink
url="http://labs.jboss.com/file-access/default/members/jbossrichface...
-org.richfaces.model.TreeNode
-</ulink>) that is used for the <emphasis
role="bold"><property><rich:tree></property></emphasis>
nodes representation.
- </para>
- <para>
- Actually you can develop and use your own implementation of the
<code>"TreeNode"</code> interface or use a
- default one, which is defined with a default class
<code>"TreeNodeImpl"</code>
-(<ulink
url="http://labs.jboss.com/file-access/default/members/jbossrichface...
-org.richfaces.model.TreeNodeImpl
-</ulink>).
- </para>
- <para>
- The
<emphasis><property>"value"</property></emphasis>
attribute
- of the <emphasis
role="bold"><property><rich:tree></property></emphasis>
component
- contains a nodes structure defined in a bean property.
- </para>
- <para>
- When the <emphasis
role="bold"><property><rich:tree></property></emphasis>
component is being rendered
- it iterates over the model nodes and renders them using one of its
<property>immediate</property>
- <emphasis
role="bold"><property><rich:treeNode></property></emphasis>
children.
- 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[...
+ <para> As it has been mentioned <link
linkend="tree">above</link> the <emphasis
+ role="bold">
+
<property><rich:tree></property>
+ </emphasis> component allows rendering any tree-like
data model. </para>
+ <para> You can build your <emphasis
role="bold">
+
<property><rich:tree></property>
+ </emphasis> using model
(<code>org.richfaces.model.TreeNode</code> or
+
<code>javax.swing.tree.TreeNode</code>). In this case the
+ <emphasis role="bold">
+
<property><rich:tree></property>
+ </emphasis> component interacts with data model via
+
<code>"TreeNode"</code> interface (<ulink
+
url="http://labs.jboss.com/file-access/default/members/jbossrichface...
+ > org.richfaces.model.TreeNode </ulink>)
that is used for
+ the <emphasis role="bold">
+
<property><rich:tree></property>
+ </emphasis> nodes representation. </para>
+ <para> Actually you can develop and use your own implementation
of the
+
<code>"TreeNode"</code> interface or use a
+ default one, which is defined with a default class
+
<code>"TreeNodeImpl"</code> (<ulink
+
url="http://labs.jboss.com/file-access/default/members/jbossrichface...
+ > org.richfaces.model.TreeNodeImpl
</ulink>). </para>
+ <para> The <emphasis>
+
<property>"value"</property>
+ </emphasis> attribute of the <emphasis
role="bold">
+
<property><rich:tree></property>
+ </emphasis> component contains a nodes structure
defined in a bean
+ property. </para>
+ <para> When the <emphasis role="bold">
+
<property><rich:tree></property>
+ </emphasis> component is being rendered it iterates
over the model
+ nodes and renders them using one of its
<property>immediate</property>
+ <emphasis role="bold">
+
<property><rich:treeNode></property>
+ </emphasis> children. 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",
@@ -148,48 +153,54 @@
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[...
+...]]></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:
-</para>
-<figure>
- <title>A simple <emphasis
role="bold"><property><rich:tree></property></emphasis>
from a <code>org.richfaces.model.TreeNode</code></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/treeModel.png"/>
- </imageobject>
- </mediaobject>
-</figure>
-
-<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
- </ulink>) that allows to transform XML into structures of objects containing
<code>"XmlNodeData"</code>
- (<ulink
url="http://labs.jboss.com/file-access/default/members/jbossrichface...
- org.richfaces.component.xml.XmlNodeData
- </ulink>) instances as data, which could be represented by the
- <emphasis
role="bold"><property><rich:tree></property></emphasis>
component.
-</para>
-<para>
- Let's try to build a simple <emphasis
role="bold"><property><rich:tree></property></emphasis>
from a local XML file.
- In the following example a simple XML file (stations.xml) is used as a radio station
playlist:
-</para>
- <programlisting role="XML"><![CDATA[<?xml
version="1.0"?>
+...]]></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>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/treeModel.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <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 </ulink>)
+ that allows to transform XML into structures of objects
containing
+
<code>"XmlNodeData"</code> (<ulink
+
url="http://labs.jboss.com/file-access/default/members/jbossrichface...
+ > org.richfaces.component.xml.XmlNodeData
</ulink>)
+ instances as data, which could be represented by the
<emphasis
+ role="bold">
+
<property><rich:tree></property>
+ </emphasis> component. </para>
+ <para> Let's try to build a simple <emphasis
role="bold">
+
<property><rich:tree></property>
+ </emphasis> from a local XML file. In the following
example a simple
+ XML file (stations.xml) is used as a radio station
playlist: </para>
+ <programlisting role="XML"><![CDATA[<?xml
version="1.0"?>
<station name="KickRadio">
<feed date="today">
<song time="07:00">Hall & Oates - Kiss On My List</song>
@@ -199,21 +210,20 @@
<song time="07:15">KC & the Sunshine Band - Give It
Up</song>
</feed>
</station>]]></programlisting>
-<para>
- Now you need to create a bean that holds a model nodes:
-</para>
-<programlisting role="JAVA"><![CDATA[...
+ <para> Now you need to create a bean that holds a model nodes:
</para>
+ <programlisting role="JAVA"><![CDATA[...
private TreeNode data;
...
FacesContext context = FacesContext.getCurrentInstance();
data = XmlTreeDataBuilder.build(new
InputSource(getClass().getResourceAsStream("stations.xml")));
...]]></programlisting>
-<para>
- Finally you should set the
<emphasis><property>"value"</property></emphasis>
attribute to the
- <code>data</code> bean property and define the
<emphasis><property>"var"</property></emphasis>
attribute in order to
- refer to the data of nodes:
-</para>
-<programlisting role="XML"><![CDATA[...
+ <para> Finally you should set the <emphasis>
+
<property>"value"</property>
+ </emphasis> attribute to the
<code>data</code> bean property and
+ define the <emphasis>
+
<property>"var"</property>
+ </emphasis> attribute in order to refer to the data
of nodes: </para>
+ <programlisting role="XML"><![CDATA[...
<rich:tree id="treeXML" value="#{stations.data}"
var="vardata">
<rich:treeNode>
<h:outputText value="#{vardata.attributes['name']}" />
@@ -223,16 +233,18 @@
</rich:treeNode>
</rich:tree>
...]]></programlisting>
- <para>This is a result:</para>
- <figure>
- <title>A simple <emphasis
role="bold"><property><rich:tree></property></emphasis>
from a local XML file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/treeXML.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
+ <para>This is a result:</para>
+ <figure>
+ <title>A simple <emphasis
role="bold">
+
<property><rich:tree></property>
+ </emphasis> from a local XML
file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/treeXML.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
<para>It's possible to define a visual representation
of a node data
model (to define a node icon) and its behavior in
correspondence with
the data contained in this node (with a value of the
<emphasis>
@@ -250,7 +262,8 @@
<property>"type"</property>
</emphasis> attribute equal to a value of
<emphasis>
<property>"nodeFace"</property>
- </emphasis> is used for node representation. See an
example below.</para>
+ </emphasis> is used for node representation. See an
example
+ below.</para>
<para id="example">
<emphasis
role="bold">Example:</emphasis>
@@ -310,7 +323,8 @@
<property><rich:treeNode></property>
</emphasis> with <emphasis>
<property>"type"</property>
- </emphasis> equal to
"<code>artist</code>" was used.</para>
+ </emphasis> equal to
"<code>artist</code>" was
+ used.</para>
<para>You can also assign an EL-expression as value of the
<emphasis>
<property>"nodeFace"</property>
</emphasis> attribute. See an example below:
</para>
@@ -324,7 +338,7 @@
<property>"nodeFace"</property>
</emphasis> attribute usage: you need to define
notions for
<property>typeless</property> and a
- <property>default</property> nodes.
</para>
+ <property>default</property> nodes.
</para>
<para>The <property>typeless node</property> is the
first <emphasis role="bold">
<property><rich:treeNode></property>
@@ -339,7 +353,8 @@
for representation when <emphasis>
<property>"nodeFace"</property>
</emphasis> attribute is null.</para>
- <para><property>Default node</property> has the
following interior presentation:</para>
+ <para><property>Default node</property> has the
following interior
+ presentation:</para>
<para>
<emphasis
role="bold">Example:</emphasis>
</para>
@@ -391,7 +406,8 @@
representation styles for the same node types. In the
example with
artists and their albums (see <link
linkend="example">above</link>)
it's possible to represent albums that are
available for sale
- and albums that are not available. Please study the example
below:</para>
+ and albums that are not available. Please study the
example
+ below:</para>
<para>
<emphasis
role="bold">Example:</emphasis>
</para>
@@ -453,7 +469,7 @@
used performing the functionality.
Note, that for
collapse/expand operations an Ajax
request is sent
to the server and it can cause a short
- delay.</para>
+ delay.</para>
</listitem>
<listitem>
<para><code>Server</code> -
regular form of submission
@@ -520,8 +536,9 @@
</emphasis> etc. </para>
<para> Information about the <emphasis>
<property>"process"</property>
- </emphasis> attribute usage you can find in the
- <link linkend="process"> "Decide
what to process" </link> guide section. </para>
+ </emphasis> attribute usage you can find in the
<link
+ linkend="process"> "Decide
what to
+ process" </link> guide section.
</para>
<!--<tip>
<title>Tip:</title>
<para>
@@ -531,23 +548,100 @@
<property><rich:tree></property>
</emphasis> is pending! </para>
</tip>-->
- <para>
- The value of <emphasis>
-
<property>"rowKeyConverter"</property>
- </emphasis> can be:
- </para>
+
+ <para>As it's mentioned before, the <emphasis
role="bold">
+
<property><rich:tree></property>
+ </emphasis> component uses a data model to represent
the tree-like
+ nodes structure on the page. To identify a particular node
during a
+ client request, the model provides a set of unique keys for
tree
+ nodes. The <property>tree</property> can use
strings as keys values
+ which may contain special characters not allowed by
browsers, such as
+ the left angle bracket (<), ampersand (&),
ant etc. Thus, to
+ have a possibility to use unallowed characters in the
+ <property>tree</property> nodes, the
following converters
+ are provided: </para>
<itemizedlist>
<listitem>
-
<para><code>org.richfaces.TreeRowKeyConverter</code> - it used for the
simple tree.</para>
+
<para><code>org.richfaces.TreeRowKeyConverter</code> that is
+ used for
<property>"TreeNode"</property> based trees.
+ The key should be of a
+
<code>java.lang.String</code> type.</para>
</listitem>
<listitem>
-
<para><code>org.richfaces.TreeAdaptorRowKeyConverter</code> used for
tree with <emphasis
role="bold"><property><rich:treeNodesAdaptor></property></emphasis></para>
+
<para><code>org.richfaces.TreeAdaptorRowKeyConverter</code>
+ that is used for adaptor-based trees
(see
+ <link
linkend="rich_treeNodesAdaptor"><emphasis role="bold">
+
<property><rich:treeNodesAdaptor></property>
+ </emphasis></link>,
<link linkend="rich_recursiveTreeNodesAdaptor"><emphasis
role="bold">
+
<property><rich:recursiveTreeNodesAdaptor></property>
+ </emphasis></link>). The
key should be of a
+
<code>java.lang.String</code> type.</para>
</listitem>
<listitem>
- <para>The
<code>org.richfaces.TreeAdaptorIntegerRowKeyConverter</code> converter used
for adaptor-based tree for implementing custom converters</para>
+
<para><code>org.richfaces.TreeAdaptorIntegerRowKeyConverter</code>
+ which is provided for adaptor-based
trees. The key
+ should be of a
<code>java.lang.Integer</code>
+ type.</para>
</listitem>
</itemizedlist>
-
+
+ <para>The converters can be extended in order to have a
possibility for
+ implementing custom converters.</para>
+ <para>To apply a converter to the <emphasis
role="bold">
+
<property><rich:tree></property>
+ </emphasis> component, you should define it as a
value of the <emphasis>
+
<property>"rowKeyConverter"</property>
+ </emphasis> attribute.</para>
+
+ <para>Have a look at the example of a tree which contains the
RichFaces
+ components as its nodes and the components attributes as
the nodes
+ child elements. As the components have unallowed characters
(<
+ and >) in their names, the
<code>org.richfaces.TreeRowKeyConverter</code> is used here.</para>
+ <para>
+ <emphasis
role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<rich:tree value="#{treeBean.data}" var="node"
switchType="ajax"
rowKeyConverter="org.richfaces.TreeRowKeyConverter">
+ <rich:treeNode ajaxSingle="true">
+ <h:outputText value="#{node}"/>
+ </rich:treeNode>
+</rich:tree>
+...]]></programlisting>
+
+ <para>In the example the tree uses the following data
model:</para>
+
+ <programlisting role="JAVA"><![CDATA[...
+String[ ] components = {"< a4j:ajaxListener >", "< a4j:keepAlive
>", "< a4j:actionparam >" };
+String[ ][ ] attributes = {{"type"},
+ {"ajaxOnly", "beanName"},
+ {"actionListener", "assignTo",
"binding", "converter", "id", "name",
"noEscape", "value"}};
+
+data = new TreeNodeImpl<String>();
+
+for (int i = 0; i < components.length; i++) {
+ TreeNode<String> child = new TreeNodeImpl<String>();
+ child.setData(components[i]);
+ data.addChild(components[i], child);
+
+ for (int j = 0; j < attributes[i].length; j++) {
+ TreeNode<String> grandChild = new TreeNodeImpl<String>();
+ grandChild.setData(attributes[i][j]);
+ child.addChild(attributes[i][j], grandChild);
+ }
+}
+...]]></programlisting>
+
+ <para>This is the result:</para>
+
+ <figure>
+ <title>The tree with the
<code>org.richfaces.TreeRowKeyConverter</code> usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/treeRowKeyConverter.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
</section>
<section id="tsebro" role="updated">
@@ -573,9 +667,8 @@
<tbody>
<row>
<entry>dragValue</entry>
- <entry>Element value drag passed
into
- processing after a Drop
- event</entry>
+ <entry>Element value drag passed
into processing
+ after a Drop event</entry>
</row>
<row>
<entry>dragListener</entry>
@@ -584,17 +677,14 @@
</row>
<row>
<entry>dragIndicator</entry>
- <entry>Id of a component that is
used as
- a drag pointer during the drag
- operation</entry>
+ <entry>Id of a component that is
used as a drag
+ pointer during the drag
operation</entry>
</row>
<row>
<entry>dragType</entry>
- <entry>Defines a drag zone type
that is
- used for definition of a
- dragged element, which can be
- accepted by a drop
- zone</entry>
+ <entry>Defines a drag zone type
that is used for
+ definition of a dragged element, which
can be
+ accepted by a drop zone</entry>
</row>
</tbody>
</tgroup>
@@ -612,26 +702,23 @@
<tbody>
<row>
<entry>dropValue</entry>
- <entry>Element value drop passed
into
- processing after Drop events
- </entry>
+ <entry>Element value drop passed
into processing
+ after Drop events </entry>
</row>
<row>
<entry>dropListener</entry>
- <entry>A listener that processes
a Drop
- event. </entry>
+ <entry>A listener that processes
a Drop event.
+ </entry>
</row>
<row>
<entry>acceptedTypes</entry>
- <entry>Drag zone names are
allowed to be
- processed with a Drop
- zone</entry>
+ <entry>Drag zone names are
allowed to be processed
+ with a Drop zone</entry>
</row>
<row>
<entry>typeMapping</entry>
<entry>Drag zones names mapping
on the
- corresponding drop zone
- parameters</entry>
+ corresponding drop zone
parameters</entry>
</row>
</tbody>
</tgroup>
@@ -644,8 +731,7 @@
</emphasis> these zones completely correspond to tree
nodes. So, all
dragging nodes should be marked with <emphasis>
<property>"dragType"</property>
- </emphasis> attribute.
- Then, to mark zone(-s), where the dragging node
+ </emphasis> attribute. Then, to mark zone(-s), where
the dragging node
could be dropped, pass the type of dragging node to the
<emphasis>
<property>"acceptedTypes"</property>
</emphasis> attribute of the drop zone. It would be
good to itemize,
@@ -664,14 +750,15 @@
<property><rich:tree></property>
</emphasis>. </para>
<para> Chapters "<link
linkend="ch1">6.40
- <dragIndicator></link>" and
"<link
- linkend="dndParam">6.39
- <dndParam></link>" describes
how to apply
- visual element, that show some additional information (e.g.
dragging
- item name) while operating with
<property>drag-and-drop</property>. </para>
+
<dragIndicator></link>" and
+ "<link
linkend="dndParam">6.39
+ <dndParam></link>"
describes how to
+ apply visual element, that show some additional information
(e.g.
+ dragging item name) while operating with
+ <property>drag-and-drop</property>.
</para>
<para> Page code, that describes a tree with built in
- <property>drag-and-drop</property> in the way
it is considered, is
- shown below. </para>
+ <property>drag-and-drop</property> in
the way it is
+ considered, is shown below. </para>
<para>
<emphasis
role="bold">Example:</emphasis>
@@ -730,7 +817,7 @@
<para><property>nodeSelectListener</property> is called
during request sending on a node
selecting event
(if request sending on this event is
- defined)</para>
+ defined)</para>
</listitem>
</itemizedlist>
@@ -788,46 +875,53 @@
role="bold">
<property><rich:tree></property>
</emphasis> component capture events occured on any
- <property>tree</property> part. But event
handlers of
+ <property>tree</property> part. But
event handlers of
<property>treeNode</property> capture
events occured on
<property>treeNode</property> only,
except for children
events. </para>
</section>
-
- <section>
- <title>Facets</title>
- <table>
- <title>Facets</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Facet name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>icon</entry>
- <entry>Redefines the icon for node. Related attribute is
"icon"</entry>
- </row>
- <row>
- <entry>iconCollapsed</entry>
- <entry>Redefines the icon for collapsed node. Related attribute is
"iconCollapsed"</entry>
- </row>
- <row>
- <entry>iconExpanded</entry>
- <entry>Redefines the icon for expanded node. Related attribute is
"iconExpanded"</entry>
- </row>
- <row>
- <entry>iconLeaf</entry>
- <entry>Redefines the icon for component leaves. Related attribute is
"iconLeaf"</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
-
+
<section>
+ <title>Facets</title>
+ <table>
+ <title>Facets</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Facet name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>icon</entry>
+ <entry>Redefines the icon for
node. Related
+ attribute is
"icon"</entry>
+ </row>
+ <row>
+
<entry>iconCollapsed</entry>
+ <entry>Redefines the icon for
collapsed node.
+ Related attribute is
+
"iconCollapsed"</entry>
+ </row>
+ <row>
+
<entry>iconExpanded</entry>
+ <entry>Redefines the icon for
expanded node.
+ Related attribute is
+
"iconExpanded"</entry>
+ </row>
+ <row>
+ <entry>iconLeaf</entry>
+ <entry>Redefines the icon for
component leaves.
+ Related attribute is
+
"iconLeaf"</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
<title>Look-and-Feel Customization</title>
<para>For skinnability implementation, the components use a
<emphasis>
@@ -898,8 +992,7 @@
<row>
<entry>rich-tree</entry>
<entry>Defines styles for a
wrapper
- <div> element of
- a tree</entry>
+ <div> element of a
tree</entry>
</row>
</tbody>
</tgroup>
@@ -955,7 +1048,8 @@
<property>"highlightedClass"</property>
</emphasis> attribute for <emphasis
role="bold">
<property><rich:tree>
</property>
- </emphasis> is defined as it's shown in the
example below:</para>
+ </emphasis> is defined as it's shown in the
example
+ below:</para>
<para>
<emphasis
role="bold">Example:</emphasis>
@@ -966,7 +1060,8 @@
<para>This is a result:</para>
<figure>
- <title>Redefinition styles with own classes and
styleClass attributes</title>
+ <title>Redefinition styles with own classes and
styleClass
+ attributes</title>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tree_oc.png"/>
@@ -983,8 +1078,8 @@
<para>
<ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?c=...
- >On the component LiveDemo page</ulink>
you can see the example of <emphasis
- role="bold">
+ >On the component LiveDemo page</ulink>
you can see the
+ example of <emphasis role="bold">
<property><rich:tree></property>
</emphasis> usage and sources for the given example.
</para>
<para>How to Expand/Collapse Tree Nodes from code, see in
this<ulink