Author: amarkhel
Date: 2008-08-13 08:14:43 -0400 (Wed, 13 Aug 2008)
New Revision: 10065
Added:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_AjaxValidator.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_BeanValidator.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_GraphValidator.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_HotKey.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_StateManagerAPI.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_AjaxValidator.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_BeanValidator.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_GraphValidator.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_HotKey.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_StateManagerAPI.gif
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/SimpleTreeBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
Log:
Fix RF-4149 RF-4156 RF-4158
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/SimpleTreeBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/SimpleTreeBean.java 2008-08-13
12:13:06 UTC (rev 10064)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/SimpleTreeBean.java 2008-08-13
12:14:43 UTC (rev 10065)
@@ -24,7 +24,9 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Properties;
import javax.faces.FacesException;
@@ -33,6 +35,7 @@
import javax.faces.context.FacesContext;
import org.richfaces.component.UITree;
+import org.richfaces.component.html.HtmlTree;
import org.richfaces.event.NodeSelectedEvent;
import org.richfaces.model.TreeNode;
import org.richfaces.model.TreeNodeImpl;
@@ -40,6 +43,7 @@
public class SimpleTreeBean {
private TreeNode rootNode = null;
+ private List<String> selectedNodeChildren = new ArrayList<String>();
private String nodeTitle;
private static final String DATA_PATH =
"/richfaces/tree/examples/simple-tree-data.properties";
@@ -88,6 +92,23 @@
}
}
+ public void processSelection(NodeSelectedEvent event) {
+ HtmlTree tree = (HtmlTree) event.getComponent();
+ nodeTitle = (String) tree.getRowData();
+ selectedNodeChildren.clear();
+ TreeNode currentNode = tree.getModelTreeNode(tree.getRowKey());
+ if (currentNode.isLeaf()){
+ selectedNodeChildren.add((String)currentNode.getData());
+ }else
+ {
+ Iterator<Map.Entry<Object, TreeNode>> it = currentNode.getChildren();
+ while (it!=null &&it.hasNext()) {
+ Map.Entry<Object, TreeNode> entry = it.next();
+ selectedNodeChildren.add(entry.getValue().getData().toString());
+ }
+ }
+ }
+
public TreeNode getTreeNode() {
if (rootNode == null) {
loadTree();
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_AjaxValidator.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_AjaxValidator.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_BeanValidator.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_BeanValidator.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_GraphValidator.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_GraphValidator.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_HotKey.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_HotKey.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_StateManagerAPI.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_StateManagerAPI.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_AjaxValidator.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/ico_AjaxValidator.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_BeanValidator.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/ico_BeanValidator.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_GraphValidator.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/ico_GraphValidator.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_HotKey.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ico_HotKey.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_StateManagerAPI.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/ico_StateManagerAPI.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml 2008-08-13
12:13:06 UTC (rev 10064)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml 2008-08-13
12:14:43 UTC (rev 10065)
@@ -5,7 +5,8 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <p>This tree uses "ajax" switch type, note that for collapse/expand
operations it will be Ajax request to the server. You may see short delay in this
case.</p><br/>
+ <p>This tree uses "ajax" switch type, note that for collapse/expand
operations it will be Ajax request to the server.
+ You may see short delay in this case.</p><br/>
<h:form>
<rich:tree style="width:300px" value="#{library.data}"
var="item" nodeFace="#{item.type}">
<rich:treeNode type="artist" iconLeaf="/images/tree/singer.gif"
icon="/images/tree/singer.gif">
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml 2008-08-13
12:13:06 UTC (rev 10064)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml 2008-08-13
12:14:43 UTC (rev 10065)
@@ -5,7 +5,8 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <p>This is again same tree, but now it uses "server" switch type. Full
page content will be reloaded at every click.</p><br/>
+ <p>This is again same tree, but now it uses "server" switch type.
+ Full page content will be reloaded at every click.</p><br/>
<h:form>
<rich:tree switchType="server" style="width:300px"
value="#{library.data}" var="item"
nodeFace="#{item.type}">
<rich:treeNode type="artist" iconLeaf="/images/tree/singer.gif"
icon="/images/tree/singer.gif">
Modified:
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-08-13
12:13:06 UTC (rev 10064)
+++
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-08-13
12:14:43 UTC (rev 10065)
@@ -5,7 +5,6 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<ui:composition>
-
<rich:panel styleClass="panel_menu"
bodyClass="rich-laguna-panel-no-header">
<rich:panelBar style="width: auto;"
selectedPanel="#{componentNavigator.currentComponent.group}"
height="625px" contentStyle="background:none;">
<rich:panelBarItem id="ajaxSupport" label="Ajax Support">