Author: lfryc(a)redhat.com
Date: 2010-12-15 12:10:12 -0500 (Wed, 15 Dec 2010)
New Revision: 20586
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/CompactDisc.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/Company.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/Country.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simple.xhtml
Log:
rich:tree - extended by default tree node sample (RF-9716, RF-9827)
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/CompactDisc.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/CompactDisc.java 2010-12-15
17:09:25 UTC (rev 20585)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/CompactDisc.java 2010-12-15
17:10:12 UTC (rev 20586)
@@ -97,4 +97,9 @@
public void setYear(int year) {
this.year = year;
}
+
+ @Override
+ public String toString() {
+ return "CompactDisc [artist=" + artist + ", title=" + title +
"]";
+ }
}
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/Company.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/Company.java 2010-12-15
17:09:25 UTC (rev 20585)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/Company.java 2010-12-15
17:10:12 UTC (rev 20586)
@@ -74,4 +74,8 @@
return compactDiscs;
}
+ @Override
+ public String toString() {
+ return "Company [name=" + name + "]";
+ }
}
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/Country.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/Country.java 2010-12-15
17:09:25 UTC (rev 20585)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/Country.java 2010-12-15
17:10:12 UTC (rev 20586)
@@ -60,4 +60,8 @@
return companies;
}
+ @Override
+ public String toString() {
+ return "Country [name=" + name + "]";
+ }
}
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simple.xhtml 2010-12-15
17:09:25 UTC (rev 20585)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simple.xhtml 2010-12-15
17:10:12 UTC (rev 20586)
@@ -42,89 +42,142 @@
<ui:define name="component">
- <rich:tree id="richTree"
- nodeType="#{node.type}"
- var="node"
- value="#{richTreeBean.root}"
+ <h3><b>rich:tree</b></h3>
+
+ <p>
+ <rich:tree id="richTree"
+ nodeType="#{node.type}"
+ var="node"
+ value="#{richTreeBean.root}"
+
+ dir="#{richTreeBean.attributes['dir'].value}"
+ lang="#{richTreeBean.attributes['lang'].value}"
+
onbeforedomupdate="#{richTreeBean.attributes['onbeforedomupdate'].value}"
+
onbeforenodetoggle="#{richTreeBean.attributes['onbeforenodetoggle'].value}"
+
onbeforeselectionchange="#{richTreeBean.attributes['onbeforeselectionchange'].value}"
+ onbegin="#{richTreeBean.attributes['onbegin'].value}"
+ onclick="#{richTreeBean.attributes['onclick'].value}"
+
oncomplete="#{richTreeBean.attributes['oncomplete'].value}"
+
ondblclick="#{richTreeBean.attributes['ondblclick'].value}"
+
onkeydown="#{richTreeBean.attributes['onkeydown'].value}"
+
onkeypress="#{richTreeBean.attributes['onkeypress'].value}"
+ onkeyup="#{richTreeBean.attributes['onkeyup'].value}"
+
onmousedown="#{richTreeBean.attributes['onmousedown'].value}"
+
onmousemove="#{richTreeBean.attributes['onmousemove'].value}"
+
onmouseup="#{richTreeBean.attributes['onmouseup'].value}"
+
onmouseout="#{richTreeBean.attributes['onmouseout'].value}"
+
onmouseover="#{richTreeBean.attributes['onmouseover'].value}"
+
onnodetoggle="#{richTreeBean.attributes['onnodetoggle'].value}"
+
onselectionchange="#{richTreeBean.attributes['onselectionchange'].value}"
+ rendered="#{richTreeBean.attributes['rendered'].value}"
+ selection="#{richTreeBean.selection}"
+
selectionType="#{richTreeBean.attributes['selectionType'].value}"
+ style="#{richTreeBean.attributes['style'].value}"
+
styleClass="#{richTreeBean.attributes['styleClass'].value}"
+ title="#{richTreeBean.attributes['title'].value}"
+
toggleType="#{richTreeBean.attributes['toggleType'].value}"
+ iconLeaf="#{richTreeBean.attributes['iconLeaf'].value}"
+
iconExpanded="#{richTreeBean.attributes['iconExpanded'].value}"
+
iconCollapsed="#{richTreeBean.attributes['iconCollapsed'].value}"
+
handleClass="#{richTreeBean.attributes['handleClass'].value}"
+
iconClass="#{richTreeBean.attributes['iconClass'].value}"
+
labelClass="#{richTreeBean.attributes['labelClass'].value}"
+
nodeClass="#{richTreeBean.attributes['nodeClass'].value}"
+
selectionChangeListener="#{richTreeListenerBean.processSelectionChange}"
+ toggleListener="#{richTreeListenerBean.processToggle}"
+ >
+
+ <rich:treeNode type="country"
+ rendered="#{richTreeNodeBean.attributes[0]['rendered'].value}"
+ iconLeaf="#{richTreeNodeBean.attributes[0]['iconLeaf'].value}"
+
iconExpanded="#{richTreeNodeBean.attributes[0]['iconExpanded'].value}"
+
iconCollapsed="#{richTreeNodeBean.attributes[0]['iconCollapsed'].value}"
+
handleClass="#{richTreeNodeBean.attributes[0]['handleClass'].value}"
+
iconClass="#{richTreeNodeBean.attributes[0]['iconClass'].value}"
+
labelClass="#{richTreeNodeBean.attributes[0]['labelClass'].value}"
+
styleClass="#{richTreeNodeBean.attributes[0]['styleClass'].value}"
+ >
+ #{node.name}
+ </rich:treeNode>
+
+ <rich:treeNode type="company"
+ icon="/images/tree/disc.gif"
+ rendered="#{richTreeNodeBean.attributes[1]['rendered'].value}"
+
iconLeaf="#{richTreeNodeBean.attributes[1]['iconLeaf'].value}"
+
iconExpanded="#{richTreeNodeBean.attributes[1]['iconExpanded'].value}"
+
iconCollapsed="#{richTreeNodeBean.attributes[1]['iconCollapsed'].value}"
+
handleClass="#{richTreeNodeBean.attributes[1]['handleClass'].value}"
+
iconClass="#{richTreeNodeBean.attributes[1]['iconClass'].value}"
+
labelClass="#{richTreeNodeBean.attributes[1]['labelClass'].value}"
+
styleClass="#{richTreeNodeBean.attributes[1]['styleClass'].value}"
+ >
+ #{node.name}
+ </rich:treeNode>
+
+ <rich:treeNode type="cd"
+ icon="/images/tree/song.gif"
+ rendered="#{richTreeNodeBean.attributes[2]['rendered'].value}"
+ iconLeaf="#{richTreeNodeBean.attributes[2]['iconLeaf'].value}"
+
iconExpanded="#{richTreeNodeBean.attributes[2]['iconExpanded'].value}"
+
iconCollapsed="#{richTreeNodeBean.attributes[2]['iconCollapsed'].value}"
+
handleClass="#{richTreeNodeBean.attributes[2]['handleClass'].value}"
+
iconClass="#{richTreeNodeBean.attributes[2]['iconClass'].value}"
+
labelClass="#{richTreeNodeBean.attributes[2]['labelClass'].value}"
+
styleClass="#{richTreeNodeBean.attributes[2]['styleClass'].value}"
+ >
+ #{node.artist} - #{node.title}
+ </rich:treeNode>
+ </rich:tree>
+ </p>
+
+ <h3><b>rich:tree</b> - with default tree nodes</h3>
+ <div>(uses toString on TreeNode as content)</div>
+
+ <p>
- dir="#{richTreeBean.attributes['dir'].value}"
- lang="#{richTreeBean.attributes['lang'].value}"
-
onbeforedomupdate="#{richTreeBean.attributes['onbeforedomupdate'].value}"
-
onbeforenodetoggle="#{richTreeBean.attributes['onbeforenodetoggle'].value}"
-
onbeforeselectionchange="#{richTreeBean.attributes['onbeforeselectionchange'].value}"
- onbegin="#{richTreeBean.attributes['onbegin'].value}"
- onclick="#{richTreeBean.attributes['onclick'].value}"
-
oncomplete="#{richTreeBean.attributes['oncomplete'].value}"
-
ondblclick="#{richTreeBean.attributes['ondblclick'].value}"
- onkeydown="#{richTreeBean.attributes['onkeydown'].value}"
-
onkeypress="#{richTreeBean.attributes['onkeypress'].value}"
- onkeyup="#{richTreeBean.attributes['onkeyup'].value}"
-
onmousedown="#{richTreeBean.attributes['onmousedown'].value}"
-
onmousemove="#{richTreeBean.attributes['onmousemove'].value}"
- onmouseup="#{richTreeBean.attributes['onmouseup'].value}"
-
onmouseout="#{richTreeBean.attributes['onmouseout'].value}"
-
onmouseover="#{richTreeBean.attributes['onmouseover'].value}"
-
onnodetoggle="#{richTreeBean.attributes['onnodetoggle'].value}"
-
onselectionchange="#{richTreeBean.attributes['onselectionchange'].value}"
- rendered="#{richTreeBean.attributes['rendered'].value}"
- selection="#{richTreeBean.selection}"
-
selectionType="#{richTreeBean.attributes['selectionType'].value}"
- style="#{richTreeBean.attributes['style'].value}"
-
styleClass="#{richTreeBean.attributes['styleClass'].value}"
- title="#{richTreeBean.attributes['title'].value}"
-
toggleType="#{richTreeBean.attributes['toggleType'].value}"
- iconLeaf="#{richTreeBean.attributes['iconLeaf'].value}"
-
iconExpanded="#{richTreeBean.attributes['iconExpanded'].value}"
-
iconCollapsed="#{richTreeBean.attributes['iconCollapsed'].value}"
-
handleClass="#{richTreeBean.attributes['handleClass'].value}"
- iconClass="#{richTreeBean.attributes['iconClass'].value}"
-
labelClass="#{richTreeBean.attributes['labelClass'].value}"
- nodeClass="#{richTreeBean.attributes['nodeClass'].value}"
-
selectionChangeListener="#{richTreeListenerBean.processSelectionChange}"
- toggleListener="#{richTreeListenerBean.processToggle}"
- >
- <rich:treeNode type="country"
- rendered="#{richTreeNodeBean.attributes[0]['rendered'].value}"
- iconLeaf="#{richTreeNodeBean.attributes[0]['iconLeaf'].value}"
-
iconExpanded="#{richTreeNodeBean.attributes[0]['iconExpanded'].value}"
-
iconCollapsed="#{richTreeNodeBean.attributes[0]['iconCollapsed'].value}"
-
handleClass="#{richTreeNodeBean.attributes[0]['handleClass'].value}"
-
iconClass="#{richTreeNodeBean.attributes[0]['iconClass'].value}"
-
labelClass="#{richTreeNodeBean.attributes[0]['labelClass'].value}"
-
styleClass="#{richTreeNodeBean.attributes[0]['styleClass'].value}"
- >
- #{node.name}
- </rich:treeNode>
-
- <rich:treeNode type="company"
- icon="/images/tree/disc.gif"
- rendered="#{richTreeNodeBean.attributes[1]['rendered'].value}"
-
iconLeaf="#{richTreeNodeBean.attributes[1]['iconLeaf'].value}"
-
iconExpanded="#{richTreeNodeBean.attributes[1]['iconExpanded'].value}"
-
iconCollapsed="#{richTreeNodeBean.attributes[1]['iconCollapsed'].value}"
-
handleClass="#{richTreeNodeBean.attributes[1]['handleClass'].value}"
-
iconClass="#{richTreeNodeBean.attributes[1]['iconClass'].value}"
-
labelClass="#{richTreeNodeBean.attributes[1]['labelClass'].value}"
-
styleClass="#{richTreeNodeBean.attributes[1]['styleClass'].value}"
- >
- #{node.name}
- </rich:treeNode>
-
- <rich:treeNode type="cd"
- icon="/images/tree/song.gif"
- rendered="#{richTreeNodeBean.attributes[2]['rendered'].value}"
- iconLeaf="#{richTreeNodeBean.attributes[2]['iconLeaf'].value}"
-
iconExpanded="#{richTreeNodeBean.attributes[2]['iconExpanded'].value}"
-
iconCollapsed="#{richTreeNodeBean.attributes[2]['iconCollapsed'].value}"
-
handleClass="#{richTreeNodeBean.attributes[2]['handleClass'].value}"
-
iconClass="#{richTreeNodeBean.attributes[2]['iconClass'].value}"
-
labelClass="#{richTreeNodeBean.attributes[2]['labelClass'].value}"
-
styleClass="#{richTreeNodeBean.attributes[2]['styleClass'].value}"
- >
- #{node.artist} - #{node.title}
- </rich:treeNode>
- </rich:tree>
+ <rich:tree id="richTreeDefaultNodes"
+ var="node"
+ value="#{richTreeBean.root}"
+
+ dir="#{richTreeBean.attributes['dir'].value}"
+ lang="#{richTreeBean.attributes['lang'].value}"
+
onbeforedomupdate="#{richTreeBean.attributes['onbeforedomupdate'].value}"
+
onbeforenodetoggle="#{richTreeBean.attributes['onbeforenodetoggle'].value}"
+
onbeforeselectionchange="#{richTreeBean.attributes['onbeforeselectionchange'].value}"
+ onbegin="#{richTreeBean.attributes['onbegin'].value}"
+ onclick="#{richTreeBean.attributes['onclick'].value}"
+
oncomplete="#{richTreeBean.attributes['oncomplete'].value}"
+
ondblclick="#{richTreeBean.attributes['ondblclick'].value}"
+
onkeydown="#{richTreeBean.attributes['onkeydown'].value}"
+
onkeypress="#{richTreeBean.attributes['onkeypress'].value}"
+ onkeyup="#{richTreeBean.attributes['onkeyup'].value}"
+
onmousedown="#{richTreeBean.attributes['onmousedown'].value}"
+
onmousemove="#{richTreeBean.attributes['onmousemove'].value}"
+
onmouseup="#{richTreeBean.attributes['onmouseup'].value}"
+
onmouseout="#{richTreeBean.attributes['onmouseout'].value}"
+
onmouseover="#{richTreeBean.attributes['onmouseover'].value}"
+
onnodetoggle="#{richTreeBean.attributes['onnodetoggle'].value}"
+
onselectionchange="#{richTreeBean.attributes['onselectionchange'].value}"
+ rendered="#{richTreeBean.attributes['rendered'].value}"
+ selection="#{richTreeBean.selection}"
+
selectionType="#{richTreeBean.attributes['selectionType'].value}"
+ style="#{richTreeBean.attributes['style'].value}"
+
styleClass="#{richTreeBean.attributes['styleClass'].value}"
+ title="#{richTreeBean.attributes['title'].value}"
+
toggleType="#{richTreeBean.attributes['toggleType'].value}"
+ iconLeaf="#{richTreeBean.attributes['iconLeaf'].value}"
+
iconExpanded="#{richTreeBean.attributes['iconExpanded'].value}"
+
iconCollapsed="#{richTreeBean.attributes['iconCollapsed'].value}"
+
handleClass="#{richTreeBean.attributes['handleClass'].value}"
+
iconClass="#{richTreeBean.attributes['iconClass'].value}"
+
labelClass="#{richTreeBean.attributes['labelClass'].value}"
+
nodeClass="#{richTreeBean.attributes['nodeClass'].value}"
+
selectionChangeListener="#{richTreeListenerBean.processSelectionChange}"
+ toggleListener="#{richTreeListenerBean.processToggle}"
+ >
+ </rich:tree>
+ </p>
</ui:define>
<ui:define name="outOfTemplateAfter">
Show replies by date