From richfaces-svn-commits at lists.jboss.org Wed Feb 2 01:19:08 2011 Content-Type: multipart/mixed; boundary="===============8364948061324015779==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r21380 - in modules/docs/trunk/Component_Reference/src/main/docbook/en-US: extras and 1 other directories. Date: Wed, 02 Feb 2011 01:19:08 -0500 Message-ID: <201102020619.p126J8mW022687@svn01.web.mwc.hst.phx2.redhat.com> --===============8364948061324015779== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: SeanRogers Date: 2011-02-02 01:19:07 -0500 (Wed, 02 Feb 2011) New Revision: 21380 Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richtree-nodeType_attribute.xml_sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richtree-nodeType_attribute_with_Expression_Language.= xml_sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/exa= m-Component_Reference-richtree-nodeType_attribute.png Removed: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richtree-nodeFace_attribute.xml_sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richtree-nodeFace_attribute_with_Expression_Language.= xml_sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/exa= m-Component_Reference-richtree-nodeFace_attribute.png Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Compo= nent_Reference-Trees.xml Log: Updated rich:tree RFPL-984 Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/cha= p-Component_Reference-Trees.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Trees.xml 2011-02-02 00:08:05 UTC (rev 21379) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Trees.xml 2011-02-02 06:19:07 UTC (rev 21380) @@ -26,7 +26,7 @@ The <rich:tree> component requires the value attribute to point to the data model for populating the = tree. The data model must be either an org.richfaces.model.T= reeNode interface, an org.richfaces.model.TreeData= Model interface, or a javax.swing.tree.TreeNode interface. The var attribute declares the = variable used for iterating through the data model, so that child = <rich:treeNode> components can reference each iteration. - For basic usage, the <rich:tree> component ne= eds one or more <rich:treeNode> components to work= with the data model. + Ideally, the <rich:tree> component needs one = or more <rich:treeNode> components to work with th= e data model. However if no <rich:treeNode> compon= ents are provided the tree creates default nodes instead. Basic usage @@ -52,40 +52,35 @@
Appearance - Different nodes in the tree can have different appearances, such as no= de icons, depending on the type of data the node contains. Use the nodeFace attribute to differentiate the types of nodes; the node= is then rendered according to the <rich:treeNode>= component with the corresponding type attribute. shows a <rich:tree> component with three different child <rich:treeNode> components defined to represent three diff= erent node appearances. Refer to for details on customizing the appearance of <rich:treeNode> components. + Different nodes in the tree can have different appearances, such as no= de icons, depending on the type of data the node contains. Use the nodeType attribute to differentiate the types of nodes; the node= is then rendered according to the <rich:treeNode>= component with the corresponding type attribute. shows a <rich:tree> component with three different child <rich:treeNode> components defined to represent three diff= erent node appearances. Refer to for details on customizing the appearance of <rich:treeNode> components. - - <varname>nodeFace</varname> attribute - + + <varname>nodeType</varname> attribute + - + - Alternatively, use Expression Language (EL) with th= e nodeFace attribute, as shown in . + Alternatively, use Expression Language (EL) with th= e nodeType attribute, as shown in . - - <varname>nodeface</varname> attribute with Expression Language<= /title> - <programlisting language=3D"XML" role=3D"XML"><xi:include parse=3D"tex= t" href=3D"extras/exam-Component_Reference-richtree-nodeFace_attribute_with= _Expression_Language.xml_sample" xmlns:xi=3D"http://www.w3.org/2001/XInclud= e" /></programlisting> + <example id=3D"exam-Component_Reference-richtree-nodeType_attribute_wit= h_Expression_Language"> + <title><varname>nodeType</varname> attribute with Expression Language<= /title> + <programlisting language=3D"XML" role=3D"XML"><xi:include parse=3D"tex= t" href=3D"extras/exam-Component_Reference-richtree-nodeType_attribute_with= _Expression_Language.xml_sample" xmlns:xi=3D"http://www.w3.org/2001/XInclud= e" /></programlisting> </example> <para> - If the <varname>nodeFace</varname> attribute returns null, the node is= rendered as a "<emphasis>typeless</emphasis>" node. The <emphasis>typeless= </emphasis> node is the first child <sgmltag><rich:treeNode></sgmltag= > component with a valid <varname>rendered</varname> attribute, but without= a defined <varname>type</varname> attribute. + If the <varname>nodeType</varname> attribute returns null, the node is= rendered as a "<emphasis>typeless</emphasis>" (or default) node. The <emph= asis>typeless</emphasis> node is the first child <sgmltag><rich:treeNode= ></sgmltag> component with a valid <varname>rendered</varname> attribute= , but without a defined <varname>type</varname> attribute. </para> <para> + If the <varname>nodeType</varname> attribute is not included and there= are no child <sgmltag><rich:treeNode></sgmltag> components, the tree= constructs a default node itself. + </para> + <para> Icons for different nodes and node states can be defined for the whole= tree using the following attributes: </para> <variablelist> <varlistentry> - <term><varname>icon</varname></term> - <listitem> - <para> - The <varname>icon</varname> attribute points to the icon to use for= any node that contains child nodes. - </para> - </listitem> - </varlistentry> - <varlistentry> <term><varname>iconLeaf</varname></term> <listitem> <para> @@ -102,6 +97,8 @@ </listitem> </varlistentry> </variablelist> + <!-- TODO not in M6 --> + <!-- <para> Alternatively, use facets with the same names as the attributes to def= ine the icons, as shown in <xref linkend=3D"exam-Component_Reference-richtr= ee-Icon_facets" />. The width of the rendered facet is 16 pixels. </para> @@ -109,12 +106,13 @@ <title>Icon facets + -->
=
Expanding and collapsing tree nodes - The switching mode for performing submissions is determined by the switchType attribute, which can have one of the following t= hree values: + The mode for performing submissions when nodes are expanded or collaps= ed is determined by the toggleType attribute, which can = have one of the following three values: @@ -142,55 +140,91 @@ + + By default, the event to expand or collapse a tree node is a mouse cli= ck. To specify a different event, use the toggleNodeEvent attribute. + +
= -
+
+ Selecting tree nodes + + The mode for performing submissions when nodes are selected is determi= ned by the selectionType attribute, which can have one o= f the following three values: + + + + ajax + + + This is the default setting. The <rich:tree> component performs an Ajax form submission, and only the content of the = tree is rendered. + + + + + server + + + The <rich:tree> component performs a commo= n submission, completely re-rendering the page. + + + + + client + + + The <rich:tree> component updates on the c= lient side, re-rendering itself and any additional components listed with t= he render attribute. + + + + +
+ +
+ Identifying nodes + + The <rich:tree> component uses a data model t= o represent the node structure on the page. To identify a particular node d= uring a client request, the model provides unique keys for tree nodes. The = <rich:tree> component can use strings as key value= s. These strings may contain special characters that are not allowed by bro= wsers, such as the left angle bracket (<) and ampersand (&). To allo= w these characters in the keys, the following converter is provided: + + + + org.richfaces.TreeRowKeyConverter + + + The org.richfaces.TreeRowKeyConverter conver= ter is used for trees constructed using <rich:treeNode> components. The key should be of the type java.lang.String. + + + + + + + To apply a converter to the <rich:tree> compo= nent, define it with the rowKeyConverter attribute. demons= trates the use of a converter to identify tree nodes. + + Identifying nodes + - The <rich:tree> component uses a data model = to represent the node structure on the page. To identify a particular node = during a client request, the model provides unique keys for tree nodes. The= <rich:tree> component can use strings as key valu= es. These strings may contain special characters that are not allowed by br= owsers, such as the left angle bracket (<) and ampersand (&). To all= ow these characters in the keys, the following converter is provided: + The tree uses the following data model. The model can contain special= characters normally disallowed in web page code. - - - org.richfaces.TreeRowKeyConverter - - - The org.richfaces.TreeRowKeyConverter conve= rter is used for trees constructed using <rich:treeNode> components. The key should be of the type java.lang.String. - - - - - - - To apply a converter to the <rich:tree> comp= onent, define it with the rowKeyConverter attribute. demon= strates the use of a converter to identify tree nodes. - - - Identifying nodes - - - The tree uses the following data model. The model can contain specia= l characters normally disallowed in web page code. - - - -
+ +
= - + The <rich:tree> component uses the following = server-side listeners: @@ -243,9 +289,10 @@ - The changeExpandListener listener processes expan= d and collapse events. + The toggleListener listener processes expand and = collapse events. + - The nodeSelectListener listener processes the req= uest when a node is selected. + The selectionChangeListener listener processes th= e request when a node is selected. @@ -304,14 +352,14 @@
Basic usage - The <rich:treeNode> component must be a chil= d of a <rich:tree> component. It does not need any= attributes declared for basic usage, but should contain the content of the= nodes. Refer to for an example of basic <rich:treeNode> c= omponent usage. + The <rich:treeNode> component must be a chil= d of a <rich:tree> component. It does not need any= attributes declared for basic usage, but can provide markup templates for = tree nodes of particular types. Refer to for an example of basic <rich:= treeNode> component usage.
=
Appearance - Refer to for the <rich:tree> component for details an= d examples on styling nodes and icons. Icon styling for individual <rich:treeNode> components uses the same attributes as the= parent <rich:tree> component: icon, iconLeaf, iconExpanded, and iconCollapsed. Icon-related attributes specified for child = <rich:treeNode> components overwrite any global ic= on attributes of the parent <rich:tree> component. + Refer to for the <rich:tree> component for details an= d examples on styling nodes and icons. Icon styling for individual <rich:treeNode> components uses the same attributes as the= parent <rich:tree> component: iconLeaf, iconExpanded, and iconCollapsed. Icon-related attributes specified for child <rich:treeNod= e> components overwrite any global icon attributes of the pare= nt <rich:tree> component. Use the rendered attribute to determine whether th= e node should actually be rendered in the tree or not. Using the r= endered attribute in combination with the <rich:treeN= ode> type attribute can allow further style= differentiation between node content, as shown in . @@ -333,8 +381,12 @@
Interactivity - All interactivity with individual nodes, such as expanding and collap= sing, drag-and-drop, and other events handling, is managed by the parent <rich:tree> component. Refer to and for further details. + Interactivity with individual nodes, such as expanding, collapsing, a= nd other event handling, can be managed by the parent <rich:tre= e> component. Refer to and for further = details. + + + Use the expanded attribute to determine whether th= e node is expanded or collapsed. +
=
Deleted: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extr= as/exam-Component_Reference-richtree-nodeFace_attribute.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richtree-nodeFace_attribute.xml_sample 2011-02-02 00= :08:05 UTC (rev 21379) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richtree-nodeFace_attribute.xml_sample 2011-02-02 06= :19:07 UTC (rev 21380) @@ -1,11 +0,0 @@ - - - - - - - - - - - Deleted: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extr= as/exam-Component_Reference-richtree-nodeFace_attribute_with_Expression_Lan= guage.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richtree-nodeFace_attribute_with_Expression_Language= .xml_sample 2011-02-02 00:08:05 UTC (rev 21379) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richtree-nodeFace_attribute_with_Expression_Language= .xml_sample 2011-02-02 06:19:07 UTC (rev 21380) @@ -1,2 +0,0 @@ - Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extra= s/exam-Component_Reference-richtree-nodeType_attribute.xml_sample (from rev= 21136, modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extra= s/exam-Component_Reference-richtree-nodeFace_attribute.xml_sample) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richtree-nodeType_attribute.xml_sample = (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richtree-nodeType_attribute.xml_sample 2011-02-02 06= :19:07 UTC (rev 21380) @@ -0,0 +1,11 @@ + + + + + + + + + + + Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extra= s/exam-Component_Reference-richtree-nodeType_attribute_with_Expression_Lang= uage.xml_sample (from rev 21136, modules/docs/trunk/Component_Reference/src= /main/docbook/en-US/extras/exam-Component_Reference-richtree-nodeFace_attri= bute_with_Expression_Language.xml_sample) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richtree-nodeType_attribute_with_Expression_Language= .xml_sample (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richtree-nodeType_attribute_with_Expression_Language= .xml_sample 2011-02-02 06:19:07 UTC (rev 21380) @@ -0,0 +1,2 @@ + Deleted: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/imag= es/exam-Component_Reference-richtree-nodeFace_attribute.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/image= s/exam-Component_Reference-richtree-nodeType_attribute.png (from rev 21136,= modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/exam-= Component_Reference-richtree-nodeFace_attribute.png) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) --===============8364948061324015779==--