[richfaces-svn-commits] JBoss Rich Faces SVN: r418 - in trunk/richfaces: common/src/test/java/org/richfaces/json and 39 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Apr 13 20:43:08 EDT 2007


Author: nbelaevski
Date: 2007-04-13 20:43:07 -0400 (Fri, 13 Apr 2007)
New Revision: 418

Removed:
   trunk/richfaces/modal-panel/src/main/java/org/richfaces/renderkit/html/images/
Modified:
   trunk/richfaces/common/src/main/java/org/richfaces/json/JSONMap.java
   trunk/richfaces/common/src/test/java/org/richfaces/json/JsonTest.java
   trunk/richfaces/dataFilterSlider/pom.xml
   trunk/richfaces/dataTable/pom.xml
   trunk/richfaces/datascroller/pom.xml
   trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
   trunk/richfaces/drag-drop/pom.xml
   trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml
   trunk/richfaces/drag-drop/src/main/config/component/dragIndicator.xml
   trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml
   trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml
   trunk/richfaces/dropdown-menu/pom.xml
   trunk/richfaces/gmap/pom.xml
   trunk/richfaces/gmap/src/main/config/component/gmap.xml
   trunk/richfaces/inputnumber-slider/pom.xml
   trunk/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
   trunk/richfaces/menu-components/pom.xml
   trunk/richfaces/modal-panel/pom.xml
   trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
   trunk/richfaces/paint2D/pom.xml
   trunk/richfaces/paint2D/src/main/config/component/paint2D.xml
   trunk/richfaces/panelbar/pom.xml
   trunk/richfaces/panelbar/src/main/config/component/panelbar.xml
   trunk/richfaces/panelmenu/pom.xml
   trunk/richfaces/separator/src/test/java/org/richfaces/component/SeparatorComponentTest.java
   trunk/richfaces/simpleTogglePanel/pom.xml
   trunk/richfaces/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml
   trunk/richfaces/spacer/pom.xml
   trunk/richfaces/spacer/src/main/config/component/spacer.xml
   trunk/richfaces/suggestionbox/pom.xml
   trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
   trunk/richfaces/tabPanel/pom.xml
   trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
   trunk/richfaces/togglePanel/pom.xml
   trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml
   trunk/richfaces/toolBar/pom.xml
   trunk/richfaces/toolBar/src/main/config/component/toolBar.xml
   trunk/richfaces/tree/pom.xml
   trunk/richfaces/tree/src/main/config/component/tree.xml
   trunk/richfaces/tree/src/main/config/component/treeNode.xml
   trunk/richfaces/tree/src/main/java/org/richfaces/component/ListRowKey.java
   trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java
   trunk/richfaces/tree/src/main/java/org/richfaces/component/UITreeNode.java
   trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeState.java
   trunk/richfaces/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandEvent.java
   trunk/richfaces/tree/src/test/java/org/richfaces/component/ListRowKeyTest.java
   trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
Log:
- Enabled automatic tests generation
- Added more tests for JSON, Tree

Modified: trunk/richfaces/common/src/main/java/org/richfaces/json/JSONMap.java
===================================================================
--- trunk/richfaces/common/src/main/java/org/richfaces/json/JSONMap.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/common/src/main/java/org/richfaces/json/JSONMap.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -97,14 +97,7 @@
 					}
 
 					public void remove() {
-						if (this.currentName != null) {
-
-							jsonObject.remove(this.currentName);
-
-							this.currentName = null;
-						} else {
-							throw new IllegalArgumentException("remove() called without current key");
-						}
+						throw new UnsupportedOperationException();
 					}
 
 				};

Modified: trunk/richfaces/common/src/test/java/org/richfaces/json/JsonTest.java
===================================================================
--- trunk/richfaces/common/src/test/java/org/richfaces/json/JsonTest.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/common/src/test/java/org/richfaces/json/JsonTest.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -4,8 +4,11 @@
 package org.richfaces.json;
 
 import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Set;
 
 import junit.framework.TestCase;
 
@@ -97,19 +100,74 @@
 		assertTrue(map.isEmpty());
 	}
 	
-	public void testMapGetString() throws Exception {
-		JSONMap map = new JSONMap("{key: {innerKey: value, moreKey: {deepKey: aaa}}}");
+	public void testMapAddiition() throws Exception {
+		JSONMap map = new JSONMap();
+		Set set = map.entrySet();
+		set.add(new JsonTestMockMapEntry("boolean", new Boolean(true)));
+		set.add(new JsonTestMockMapEntry("double", new Double(23.45)));
+		set.add(new JsonTestMockMapEntry("integer", new Integer(56)));
+		set.add(new JsonTestMockMapEntry("long", new Long(89)));
+		set.add(new JsonTestMockMapEntry("string", "testString"));
 
-		String[] split = map.getString().split("\n");
-		assertTrue(split[1].startsWith("\"innerKey"));
-		assertTrue(split[2].startsWith("\"moreKey"));
+		HashSet hashSet = new HashSet();
+
+		hashSet.add("15");
+		hashSet.add(new Double(45.01));
+	
+		HashSet etalonSet = (HashSet) hashSet.clone();
+
+	
+		HashMap hashMap = new HashMap();
+
+		hashMap.put("16", new Boolean(false));
+		hashMap.put("key", new Double(145.01));
+	
+		HashMap etalonMap = (HashMap) hashMap.clone();
+
+		set.add(new JsonTestMockMapEntry("collection", hashSet));
+		set.add(new JsonTestMockMapEntry("map", hashMap));
+	
+		assertEquals(Boolean.TRUE, map.get("boolean"));
+		assertEquals(new Double(23.45), map.get("double"));
+		assertEquals(new Integer(56), map.get("integer"));
+		assertEquals(new Long(89), map.get("long"));
+		assertEquals("testString", map.get("string"));
 		
-		split = map.getString(3).split("\n");
-		assertTrue(split[1].startsWith("   \"innerKey"));
-		assertTrue(split[2].startsWith("   \"moreKey"));
+		Collection collection = (Collection) map.get("collection");
+		assertTrue(etalonSet.containsAll(collection));
+		etalonSet.removeAll(collection);
+		assertTrue(etalonSet.isEmpty());
+		
+		assertEquals(etalonMap, map.get("map"));
+	}
 
-		split = map.getString(8).split("\n");
-		assertTrue(split[1].startsWith("        \"innerKey"));
-		assertTrue(split[2].startsWith("        \"moreKey"));
+}
+
+class JsonTestMockMapEntry implements Map.Entry {
+
+	private Object key;
+	private Object value;
+	
+	
+	
+	public JsonTestMockMapEntry(Object key, Object value) {
+		super();
+		this.key = key;
+		this.value = value;
 	}
-}
+
+	public Object getKey() {
+		return key;
+	}
+
+	public Object getValue() {
+		return value;
+	}
+
+	public Object setValue(Object newValue) {
+		Object oldValue = value;
+		value = newValue;
+		return oldValue;
+	}
+	
+}
\ No newline at end of file

Modified: trunk/richfaces/dataFilterSlider/pom.xml
===================================================================
--- trunk/richfaces/dataFilterSlider/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/dataFilterSlider/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -22,6 +22,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/dataTable/pom.xml
===================================================================
--- trunk/richfaces/dataTable/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/dataTable/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/datascroller/pom.xml
===================================================================
--- trunk/richfaces/datascroller/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/datascroller/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
===================================================================
--- trunk/richfaces/datascroller/src/main/config/component/datascroller.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/datascroller/src/main/config/component/datascroller.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -10,6 +10,10 @@
 		<family>org.richfaces.Datascroller</family>
 		<classname>org.richfaces.component.html.HtmlDatascroller</classname>
 		<superclass>org.richfaces.component.UIDatascroller</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlDatascrollerComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[
     ]]>

Modified: trunk/richfaces/drag-drop/pom.xml
===================================================================
--- trunk/richfaces/drag-drop/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/drag-drop/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -22,6 +22,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -6,6 +6,10 @@
 		<family>org.richfaces.DndParam</family>
 		<classname>org.richfaces.component.html.HtmlDndParam</classname>
 		<superclass>org.richfaces.component.UIDndParam</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlDndParamComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[A component is used for parameters transmission in Drag and Drop operations. It's also used for dragIndicator elements definition with transmitting some values for rendering in it. 
     ]]>

Modified: trunk/richfaces/drag-drop/src/main/config/component/dragIndicator.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dragIndicator.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/drag-drop/src/main/config/component/dragIndicator.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -6,6 +6,10 @@
 		<family>org.richfaces.DragIndicator</family>
 		<classname>org.richfaces.component.html.HtmlDragIndicator</classname>
 		<superclass>org.richfaces.component.UIDragIndicator</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlDragIndicatorComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[It's a component appearing under a mouse cursor during Drag'n'Drop operation and containing information on dragged element and elements.
     ]]>

Modified: trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -6,6 +6,10 @@
 		<family>org.richfaces.DragSupport</family>
 		<classname>org.richfaces.component.html.HtmlDragSupport</classname>
 		<superclass>org.richfaces.component.UIDragSupport</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlDragSupportComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[
     ]]>

Modified: trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -7,6 +7,10 @@
 		<family>org.richfaces.DropSupport</family>
 		<classname>org.richfaces.component.html.HtmlDropSupport</classname>
 		<superclass>org.richfaces.component.UIDropSupport</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlDropSupportComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[
     ]]>

Modified: trunk/richfaces/dropdown-menu/pom.xml
===================================================================
--- trunk/richfaces/dropdown-menu/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/dropdown-menu/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/gmap/pom.xml
===================================================================
--- trunk/richfaces/gmap/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/gmap/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/gmap/src/main/config/component/gmap.xml
===================================================================
--- trunk/richfaces/gmap/src/main/config/component/gmap.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/gmap/src/main/config/component/gmap.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -11,6 +11,7 @@
 			It presents the google map in JSF applications
             ]]>
 		</description>
+		<test />
 		<renderer generate="true" override="true">
 			<name>org.richfaces.GmapRenderer</name>
 			<template>gmap.jspx</template>

Modified: trunk/richfaces/inputnumber-slider/pom.xml
===================================================================
--- trunk/richfaces/inputnumber-slider/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/inputnumber-slider/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -12,6 +12,10 @@
 		<superclass>
 			org.richfaces.component.UIInputNumberSlider
 		</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlInputNumberSliderComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[A component that lets selecting a number from a numeric region. It is a horizontal
     		aligned scroll-like control with its own input field (optional) present. The keyboard input in a

Modified: trunk/richfaces/menu-components/pom.xml
===================================================================
--- trunk/richfaces/menu-components/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/menu-components/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/modal-panel/pom.xml
===================================================================
--- trunk/richfaces/modal-panel/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/modal-panel/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -6,6 +6,10 @@
 		<family>org.richfaces.ModalPanel</family>
 		<classname>org.richfaces.component.html.HtmlModalPanel</classname>
 		<superclass>org.richfaces.component.UIModalPanel</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlModalPanelComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[
     ]]>

Modified: trunk/richfaces/paint2D/pom.xml
===================================================================
--- trunk/richfaces/paint2D/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/paint2D/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/paint2D/src/main/config/component/paint2D.xml
===================================================================
--- trunk/richfaces/paint2D/src/main/config/component/paint2D.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/paint2D/src/main/config/component/paint2D.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -6,6 +6,10 @@
 		<family>javax.faces.Output</family>
 		<classname>org.richfaces.component.html.HtmlPaint2D</classname>
 		<superclass>org.richfaces.component.UIPaint2D</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlPaint2DComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[
 			Create an image by paint in a managed bean, same as paint (Graphics g) in SWING components.

Modified: trunk/richfaces/panelbar/pom.xml
===================================================================
--- trunk/richfaces/panelbar/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/panelbar/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/panelbar/src/main/config/component/panelbar.xml
===================================================================
--- trunk/richfaces/panelbar/src/main/config/component/panelbar.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/panelbar/src/main/config/component/panelbar.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -9,6 +9,10 @@
 		<family>org.richfaces.PanelBar</family>
 		<classname>org.richfaces.component.html.HtmlPanelBar</classname>
 		<superclass>org.richfaces.component.UIPanelBar</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlPanelBarComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[A component with categories sliding up and down to reveal and hide items under selected
 			categories (as used in Microsoft Outlook).
@@ -86,6 +90,10 @@
 		<description>Slider Panel Item</description>
 		<classname>org.richfaces.component.html.HtmlPanelBarItem</classname>
 		<superclass>org.richfaces.component.UIPanelBarItem</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlPanelBarItemComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<renderer generate="true" override="true">
 			<name>org.richfaces.PanelBarItemRenderer</name>
 			<template>panelBarItem.jspx</template>

Modified: trunk/richfaces/panelmenu/pom.xml
===================================================================
--- trunk/richfaces/panelmenu/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/panelmenu/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -24,6 +24,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/separator/src/test/java/org/richfaces/component/SeparatorComponentTest.java
===================================================================
--- trunk/richfaces/separator/src/test/java/org/richfaces/component/SeparatorComponentTest.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/separator/src/test/java/org/richfaces/component/SeparatorComponentTest.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,27 +21,35 @@
 
 package org.richfaces.component;
 
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.Page;
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.ajax4jsf.framework.resource.InternetResourceBuilder;
-import org.ajax4jsf.framework.resource.ResourceBuilderImpl;
-import org.ajax4jsf.framework.resource.InternetResource;
-import org.ajax4jsf.framework.util.image.ImageInfo;
-import org.richfaces.renderkit.html.SeparatorRendererBase;
-
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIOutput;
 import javax.faces.component.html.HtmlForm;
 import javax.faces.component.html.HtmlOutputText;
 import javax.servlet.http.HttpServletResponse;
 
+import org.ajax4jsf.framework.resource.InternetResource;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.ResourceBuilderImpl;
+import org.ajax4jsf.framework.util.image.ImageInfo;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+import com.gargoylesoftware.htmlunit.Page;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
 /**
  * Unit test for Separator component.
  */
 public class SeparatorComponentTest extends AbstractAjax4JsfTestCase {
 
+    private static final String[] SUPPORTED_TYPES = {
+        UISeparator.LINE_TYPE_BEVEL,
+        UISeparator.LINE_TYPE_DASHED,
+        UISeparator.LINE_TYPE_DOTTED,
+        UISeparator.LINE_TYPE_DOUBLE,
+        UISeparator.LINE_TYPE_SOLID
+    };
+	
     private UISeparator ui;
     private UIComponent form;
     private UIOutput out1;
@@ -140,5 +148,45 @@
         //image recognizable?
         assertTrue(info.check());
         assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
+
+    
+        ui.setLineType(UISeparator.LINE_TYPE_DOTTED);
+        renderView();
+        resource = builder.getResource("org.richfaces.renderkit.html.images.SimpleSeparatorImage");
+        assertNotNull(resource);
+        uri = "http:" + resource.getUri(facesContext, ui);
+        page = webClient.getPage(uri);
+        assertTrue(page.getWebResponse().getStatusCode() == HttpServletResponse.SC_OK);
+        info = new ImageInfo();
+        info.setInput(page.getWebResponse().getContentAsStream());
+        //image recognizable?
+        assertTrue(info.check());
+        assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
+        
+        ui.setLineType(UISeparator.LINE_TYPE_DASHED);
+        renderView();
+        resource = builder.getResource("org.richfaces.renderkit.html.images.SimpleSeparatorImage");
+        assertNotNull(resource);
+        uri = "http:" + resource.getUri(facesContext, ui);
+        page = webClient.getPage(uri);
+        assertTrue(page.getWebResponse().getStatusCode() == HttpServletResponse.SC_OK);
+        info = new ImageInfo();
+        info.setInput(page.getWebResponse().getContentAsStream());
+        //image recognizable?
+        assertTrue(info.check());
+        assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
+        
+        ui.setLineType(UISeparator.LINE_TYPE_DOUBLE);
+        renderView();
+        resource = builder.getResource("org.richfaces.renderkit.html.images.SimpleSeparatorImage");
+        assertNotNull(resource);
+        uri = "http:" + resource.getUri(facesContext, ui);
+        page = webClient.getPage(uri);
+        assertTrue(page.getWebResponse().getStatusCode() == HttpServletResponse.SC_OK);
+        info = new ImageInfo();
+        info.setInput(page.getWebResponse().getContentAsStream());
+        //image recognizable?
+        assertTrue(info.check());
+        assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
     }
 }

Modified: trunk/richfaces/simpleTogglePanel/pom.xml
===================================================================
--- trunk/richfaces/simpleTogglePanel/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/simpleTogglePanel/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -6,6 +6,10 @@
         <family>org.richfaces.SimpleTogglePanel</family>
         <classname>org.richfaces.component.html.HtmlSimpleTogglePanel</classname>
         <superclass>org.richfaces.component.UISimpleTogglePanel</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlSimpleTogglePanelComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
         <description>
             <![CDATA[Wrapper component with named facets. Every facet will be shown after activation
             corresponding toggleControl(the other will be hidden).

Modified: trunk/richfaces/spacer/pom.xml
===================================================================
--- trunk/richfaces/spacer/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/spacer/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/spacer/src/main/config/component/spacer.xml
===================================================================
--- trunk/richfaces/spacer/src/main/config/component/spacer.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/spacer/src/main/config/component/spacer.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -12,6 +12,10 @@
 			By using style='display:block' can be used as a line spacer.
     ]]>
 		</description>
+		<test>
+			<classname>org.richfaces.component.html.HtmlSpacerComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<renderer generate="true" override="true">
 			<name>org.richfaces.SpacerRenderer</name>
 			<template>spacer.jspx</template>

Modified: trunk/richfaces/suggestionbox/pom.xml
===================================================================
--- trunk/richfaces/suggestionbox/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/suggestionbox/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -22,6 +22,13 @@
                             <goal>generate</goal>
                         </goals>
                     </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
                 </executions>
                 <configuration>
                     <library>

Modified: trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -8,6 +8,10 @@
             org.richfaces.component.html.HtmlSuggestionBox
         </classname>
         <superclass>org.richfaces.component.UISuggestionBox</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlSuggestionBoxComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
         <description>
             <![CDATA[
         This element adds "on-keypress" suggestions capabilites to any input text component (like <h:inputText>).

Modified: trunk/richfaces/tabPanel/pom.xml
===================================================================
--- trunk/richfaces/tabPanel/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tabPanel/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
===================================================================
--- trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -9,6 +9,10 @@
 		<family>org.richfaces.TabPanel</family>
 		<classname>org.richfaces.component.html.HtmlTabPanel</classname>
 		<superclass>org.richfaces.component.UITabPanel</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlTabPanelComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[A tab panel displaying tabs for grouping content of a panel.
     ]]>
@@ -105,6 +109,10 @@
 		<family>org.richfaces.Tab</family>
 		<classname>org.richfaces.component.html.HtmlTab</classname>
 		<superclass>org.richfaces.component.UITab</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlTabComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[A tab section within a tab panel]]>
 		</description>

Modified: trunk/richfaces/togglePanel/pom.xml
===================================================================
--- trunk/richfaces/togglePanel/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/togglePanel/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml
===================================================================
--- trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -12,6 +12,10 @@
 		<classname>
 			org.richfaces.component.html.HtmlTogglePanel
 		</classname>
+		<test>
+			<classname>org.richfaces.component.html.HtmlTogglePanelComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[A collapsible panel, which content is shown/hidden after activating a header control.
     ]]>
@@ -91,6 +95,10 @@
 		<superclass>
 			org.richfaces.component.UIToggleControl
 		</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlToggleControlComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 
 		<renderer  generate="true" override="true">
 			<name>org.richfaces.ToggleControlRenderer</name>

Modified: trunk/richfaces/toolBar/pom.xml
===================================================================
--- trunk/richfaces/toolBar/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/toolBar/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/toolBar/src/main/config/component/toolBar.xml
===================================================================
--- trunk/richfaces/toolBar/src/main/config/component/toolBar.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/toolBar/src/main/config/component/toolBar.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -7,6 +7,10 @@
     <family>org.richfaces.ToolBar</family>    
     <classname>org.richfaces.component.html.HtmlToolBar</classname>
     <superclass>org.richfaces.component.UIToolBar</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlToolBarComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
     <description>
 		<![CDATA[A horizontal bar with Action items on it that accepts any JSF components as children.]]>
 	</description>
@@ -94,6 +98,10 @@
     <family>org.richfaces.ToolBar</family>
     <superclass>org.richfaces.component.UIToolBarGroup</superclass>
     <classname>org.richfaces.component.html.HtmlToolBarGroup</classname>
+		<test>
+			<classname>org.richfaces.component.html.HtmlToolBarGroupComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
     <description>
 		<![CDATA[The ToolBarGroup component description.]]>
 	</description> 

Modified: trunk/richfaces/tree/pom.xml
===================================================================
--- trunk/richfaces/tree/pom.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/pom.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -22,6 +22,13 @@
               <goal>generate</goal>
             </goals>
           </execution>
+          <execution>
+		<id>generate-test-sources</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>generate-tests</goal>
+            </goals>
+          </execution>
         </executions>
         <configuration>
           <library>

Modified: trunk/richfaces/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/richfaces/tree/src/main/config/component/tree.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/src/main/config/component/tree.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -12,6 +12,10 @@
 		<family>org.richfaces.Tree</family>
 		<classname>org.richfaces.component.html.HtmlTree</classname>
 		<superclass>org.richfaces.component.UITree</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlTreeComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[
     ]]>

Modified: trunk/richfaces/tree/src/main/config/component/treeNode.xml
===================================================================
--- trunk/richfaces/tree/src/main/config/component/treeNode.xml	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/src/main/config/component/treeNode.xml	2007-04-14 00:43:07 UTC (rev 418)
@@ -12,6 +12,10 @@
 		<family>org.richfaces.TreeNode</family>
 		<classname>org.richfaces.component.html.HtmlTreeNode</classname>
 		<superclass>org.richfaces.component.UITreeNode</superclass>
+		<test>
+			<classname>org.richfaces.component.html.HtmlTreeNodeComponentTest</classname>
+			<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+		</test>
 		<description>
 			<![CDATA[
     	]]>

Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/ListRowKey.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/ListRowKey.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/ListRowKey.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -179,10 +179,6 @@
 		if (rowKey instanceof ListRowKey) {
 			ListRowKey listRowKey = (ListRowKey) rowKey;
 
-			if (listRowKey == null) {
-				return false;
-			}
-
 			int commonLength = getCommonPathLength(listRowKey);
 			if (commonLength != 0) {
 				return commonLength == depth();

Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -24,7 +24,6 @@
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.NoSuchElementException;
 import java.util.Set;
 
 import javax.faces.application.Application;
@@ -445,7 +444,7 @@
 
 
 	protected Iterator fixedChildren() {
-		return new NullIterator();
+		return getFacets().values().iterator();
 	}
 
 
@@ -614,14 +613,26 @@
 		addFacesListener(listener);
 	}
 
-	public Object getDragValue() {
-		return getRowKey();
+	public void removeChangeExpandListener(NodeExpandedListener listener) {
+		removeFacesListener(listener);
 	}
 
-	public UIComponent getComponent() {
-		return this;
+	public void removeNodeSelectListener(NodeSelectedListener listener) {
+		removeFacesListener(listener);
 	}
 
+	public NodeExpandedListener[] getChangeExpandListeners() {
+		return (NodeExpandedListener[]) getFacesListeners(NodeExpandedListener.class);
+	}
+
+	public NodeSelectedListener[] getNodeSelectListeners() {
+		return (NodeSelectedListener[]) getFacesListeners(NodeSelectedListener.class);
+	}
+
+	public Object getDragValue() {
+		return getRowKey();
+	}
+
 	public Object getDropValue() {
 		return getRowKey();
 	}
@@ -754,22 +765,4 @@
 	}
 }
 
-/**
- * @author Nick Belaevski - nbelaevski at exadel.com created 04.01.2007
- * 
- * Iterator stub class
- */
-class NullIterator implements Iterator {
 
-	public boolean hasNext() {
-		return false;
-	}
-
-	public Object next() {
-		throw new NoSuchElementException();
-	}
-
-	public void remove() {
-		throw new UnsupportedOperationException();
-	}
-}

Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/UITreeNode.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/UITreeNode.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/UITreeNode.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -8,7 +8,6 @@
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIComponentBase;
 import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
 import javax.faces.event.AbortProcessingException;
 import javax.faces.event.FacesEvent;
 
@@ -32,9 +31,6 @@
 public abstract class UITreeNode extends UIComponentBase implements
 TreeListenerEventsProducer, Draggable, Dropzone {
 
-	private String dragType;
-	private Object acceptedTypes;
-
 	public static final String COMPONENT_TYPE = "org.richfaces.TreeNode";
 
 	public static final String COMPONENT_FAMILY = "org.richfaces.TreeNode";
@@ -80,11 +76,13 @@
 	public abstract String getSelectedClass();
 
 	public boolean hasAjaxSubmitSelection() {
-		if ("inherit".equals(getAjaxSubmitSelection())) {
+		String ajaxSubmitSelection = getAjaxSubmitSelection();
+		if ("inherit".equals(ajaxSubmitSelection) || 
+				ajaxSubmitSelection == null || ajaxSubmitSelection.length() == 0) {
 			return getUITree().isAjaxSubmitSelection();
-		} else if ("true".equals(getAjaxSubmitSelection())) {
+		} else if ("true".equals(ajaxSubmitSelection)) {
 			return true;
-		} else if ("false".equals(getAjaxSubmitSelection())) {
+		} else if ("false".equals(ajaxSubmitSelection)) {
 			return false;
 		} else {
 			throw new IllegalArgumentException(
@@ -121,6 +119,23 @@
 		addFacesListener(listener);
 	}
 
+	public void removeChangeExpandListener(NodeExpandedListener listener) {
+		removeFacesListener(listener);
+	}
+
+	public void removeNodeSelectListener(NodeSelectedListener listener) {
+		removeFacesListener(listener);
+	}
+
+	public NodeExpandedListener[] getChangeExpandListeners() {
+		return (NodeExpandedListener[]) getFacesListeners(NodeExpandedListener.class);
+	}
+
+	public NodeSelectedListener[] getNodeSelectListeners() {
+		return (NodeSelectedListener[]) getFacesListeners(NodeSelectedListener.class);
+	}
+	
+	
 	/**
 	 * Finds direct parent {@link UITree} component or throws
 	 * {@link ClassCastException} if parent is not {@link UITree}
@@ -142,10 +157,6 @@
 		}
 	}
 
-	public UIComponent getComponent() {
-		return this;
-	}
-
 	public void addDropListener(DropListener listener) {
 		addFacesListener(listener);
 	}
@@ -198,82 +209,4 @@
 		// TODO Auto-generated method stub
 		
 	}
-
-	/*
-	 * Key of a drag object. It's used to define a necessity of processing the current dragged element on the drop zone side
-	 * Getter for dragType
-	 * @return dragType value from local variable or value bindings
-	 */
-	public String getDragType(  ){
-		if (null != this.dragType)
-		{
-			return this.dragType;
-		}
-		ValueBinding vb = getValueBinding("dragType");
-		if (null != vb){
-			return (String)vb.getValue(getFacesContext());
-		} else {
-			UITree tree = getUITree();
-			if (tree != null) {
-				return tree.getDragType();
-			}
-
-			return null;
-		}
-	}
-	/*
-	 * Key of a drag object. It's used to define a necessity of processing the current dragged element on the drop zone side
-	 * Setter for dragType
-	 * @param dragType - new value
-	 */
-	public void setDragType( String  __dragType ){
-		this.dragType = __dragType;
-	}
-	/*
-	 * List of drag types to be processd by the current drop zone.
-	 * Getter for acceptedTypes
-	 * @return acceptedTypes value from local variable or value bindings
-	 */
-	public Object getAcceptedTypes(  ){
-		if (null != this.acceptedTypes)
-		{
-			return this.acceptedTypes;
-		}
-		ValueBinding vb = getValueBinding("acceptedTypes");
-		if (null != vb){
-			return (Object)vb.getValue(getFacesContext());
-		} else {
-			UITree tree = getUITree();
-			if (tree != null) {
-				return tree.getAcceptedTypes();
-			}
-
-			return null;
-		}
-	}
-	/*
-	 * List of drag types to be processd by the current drop zone.
-	 * Setter for acceptedTypes
-	 * @param acceptedTypes - new value
-	 */
-	public void setAcceptedTypes( Object  __acceptedTypes ){
-		this.acceptedTypes = __acceptedTypes;
-	}
-
-	public Object saveState(FacesContext context) {
-		Object superState = super.saveState(context);
-		Object[] state = new Object[3];
-		state[0] = superState;
-		state[1] = this.dragType;
-		state[2] = this.acceptedTypes;
-		
-		return state;
-	}
-	
-	public void restoreState(FacesContext context, Object state) {
-		Object[] _state = (Object[]) state;
-		super.restoreState(context, _state[0]);
-		this.dragType = (String) _state[1];
-		this.acceptedTypes = _state[2];
-	}
 }

Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeState.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeState.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeState.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -45,7 +45,7 @@
  * @author Nick Belaevski - nbelaevski at exadel.com created 23.11.2006
  * 
  */
-public class TreeState implements DataComponentState, TreeStateCommandsListener,StateHolder {
+public class TreeState implements DataComponentState, TreeStateCommandsListener, StateHolder {
 	private final class Visitor implements DataVisitor {
 		private TreeRowKey key;
 

Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandEvent.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandEvent.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandEvent.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -28,8 +28,6 @@
 import javax.faces.event.FacesEvent;
 import javax.faces.event.FacesListener;
 
-import org.richfaces.component.UITree;
-
 /**
  * @author Nick - mailto:nbelaevski at exadel.com
  * created 01.12.2006
@@ -64,9 +62,5 @@
 		}
 	}
 
-	protected UITree getTree() {
-		return (UITree) getComponent();
-	}
-	
 	protected abstract void execute(TreeStateCommandsListener commandsListener) throws IOException;
 }

Modified: trunk/richfaces/tree/src/test/java/org/richfaces/component/ListRowKeyTest.java
===================================================================
--- trunk/richfaces/tree/src/test/java/org/richfaces/component/ListRowKeyTest.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/src/test/java/org/richfaces/component/ListRowKeyTest.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,7 @@
 
 package org.richfaces.component;
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -28,6 +29,8 @@
 
 import junit.framework.TestCase;
 
+import org.apache.commons.collections.iterators.ArrayIterator;
+
 /**
  * @author Nick Belaevski - nbelaevski at exadel.com
  * created 09.04.2007
@@ -129,4 +132,166 @@
 		assertTrue(key1.equals(key2));
 		assertTrue(key1.toString().equals(key2.toString()));
 	}
+
+	public void testEqualsAndHash() {
+		List keyBase = new ArrayList();
+		keyBase.add(new Long(12));
+		keyBase.add("string");
+		
+		List keyBase1 = new ArrayList();
+		keyBase1.add(keyBase);
+		keyBase1.add(new Double(23.56));
+		keyBase1.add("moreStrings");
+		
+		List keyBase2 = new ArrayList();
+		keyBase2.add(keyBase);
+		keyBase2.add(new Double(23.56));
+		keyBase2.add("moreStrings");
+		
+		ListRowKey rowKey = new ListRowKey(keyBase);
+		ListRowKey rowKey1 = new ListRowKey(keyBase1);
+		ListRowKey rowKey2 = new ListRowKey(keyBase2);
+		
+		assertTrue(rowKey.equals(rowKey));
+		assertTrue(rowKey1.equals(rowKey1));
+		assertTrue(rowKey2.equals(rowKey2));
+
+		assertTrue(rowKey1.equals(rowKey2));
+		assertTrue(rowKey2.equals(rowKey1));
+
+		assertFalse(rowKey.equals(rowKey1));
+		assertFalse(rowKey.equals(rowKey2));
+		assertFalse(rowKey1.equals(rowKey));
+		assertFalse(rowKey2.equals(rowKey));
+
+		assertFalse(rowKey.equals(null));
+		assertFalse(rowKey1.equals(null));
+		assertFalse(rowKey2.equals(null));
+
+		TreeRowKey treeKey = new TreeRowKey() {
+
+			/**
+			 * 
+			 */
+			private static final long serialVersionUID = 3323949145821721122L;
+
+			public int depth() {
+				throw new UnsupportedOperationException();
+			}
+
+			public int getCommonPathLength(TreeRowKey otherRowKey) {
+				throw new UnsupportedOperationException();
+			}
+
+			public String getPath() {
+				throw new UnsupportedOperationException();
+			}
+
+			public Iterator getSubPathIterator(int fromIndex) {
+				throw new UnsupportedOperationException();
+			}
+
+			public Iterator iterator() {
+				throw new UnsupportedOperationException();
+			}
+			
+		};		
+
+		assertFalse(rowKey.equals(treeKey));
+		assertFalse(rowKey1.equals(treeKey));
+		assertFalse(rowKey2.equals(rowKey));
+		
+		assertTrue(rowKey1.hashCode() == rowKey2.hashCode());
+
+		assertFalse(rowKey.hashCode() == rowKey1.hashCode());
+		assertFalse(rowKey.hashCode() == rowKey2.hashCode());
+	}
+
+	public void testSubPathIterator() throws Exception {
+		List keyBase = new ArrayList();
+		keyBase.add(new Long(13));
+		keyBase.add("string");
+		
+		ListRowKey listRowKey = new ListRowKey(keyBase);
+		Iterator iterator = listRowKey.getSubPathIterator(0);
+		assertTrue(iterator.hasNext());
+		assertEquals(new Long(13), iterator.next());
+		assertTrue(iterator.hasNext());
+		assertEquals("string", iterator.next());
+		assertFalse(iterator.hasNext());
+		
+		iterator = listRowKey.getSubPathIterator(1);
+		assertTrue(iterator.hasNext());
+		assertEquals("string", iterator.next());
+		assertFalse(iterator.hasNext());
+
+		iterator = listRowKey.getSubPathIterator(2);
+		assertFalse(iterator.hasNext());
+	}
+
+	public void testIsSubkey() throws Exception {
+		List keyBase = new ArrayList();
+		keyBase.add(new Long(12));
+
+		ListRowKey listRowKey = new ListRowKey(keyBase);
+		
+		keyBase.add("string");
+		
+		ListRowKey listRowKey1 = new ListRowKey(keyBase);
+	
+		assertFalse(new ListRowKey().isSubKey(listRowKey1));
+		assertFalse(new ListRowKey().isSubKey(listRowKey));
+		assertTrue(listRowKey.isSubKey(new ListRowKey()));
+		assertTrue(listRowKey1.isSubKey(new ListRowKey()));
+
+		assertTrue(listRowKey.isSubKey(listRowKey1));
+		assertFalse(listRowKey1.isSubKey(listRowKey));
+
+		assertTrue(listRowKey.isSubKey(listRowKey));
+		assertTrue(listRowKey1.isSubKey(listRowKey1));
+
+		assertFalse(listRowKey.isSubKey(null));
+		assertFalse(listRowKey1.isSubKey(null));
+	
+		TreeRowKey treeRowKey = new TreeRowKey() {
+
+			/**
+			 * 
+			 */
+			private static final long serialVersionUID = -6975483562771738488L;
+
+			private Object[] data = new Object[] {
+				new Long(12),
+				"string",
+				new Double(3.14159265)
+			};
+			
+			public int depth() {
+				return 3;
+			}
+
+			public int getCommonPathLength(TreeRowKey otherRowKey) {
+				throw new UnsupportedOperationException();
+			}
+
+			public String getPath() {
+				return "12:string:3.14159265";
+			}
+
+			public Iterator getSubPathIterator(int fromIndex) {
+				throw new UnsupportedOperationException();
+			}
+
+			public Iterator iterator() {
+				return new ArrayIterator(data);
+			}
+			
+		};
+
+		assertTrue(listRowKey.isSubKey(treeRowKey));
+		assertTrue(listRowKey1.isSubKey(treeRowKey));
+
+		assertFalse(treeRowKey.isSubKey(listRowKey));
+		assertFalse(treeRowKey.isSubKey(listRowKey));
+	}
 }

Modified: trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
===================================================================
--- trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeComponentTest.java	2007-04-13 18:58:54 UTC (rev 417)
+++ trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeComponentTest.java	2007-04-14 00:43:07 UTC (rev 418)
@@ -21,6 +21,7 @@
 
 package org.richfaces.component;
 
+import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -30,18 +31,32 @@
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIForm;
 import javax.faces.component.UIInput;
+import javax.faces.component.UIOutput;
 import javax.faces.component.UIViewRoot;
 import javax.faces.component.html.HtmlCommandLink;
 import javax.faces.component.html.HtmlForm;
 import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
 import javax.servlet.http.HttpServletResponse;
 
+import org.ajax4jsf.dnd.event.DragEvent;
+import org.ajax4jsf.dnd.event.DragListener;
+import org.ajax4jsf.dnd.event.DropEvent;
+import org.ajax4jsf.dnd.event.DropListener;
 import org.ajax4jsf.framework.resource.InternetResource;
 import org.ajax4jsf.framework.resource.InternetResourceBuilder;
 import org.ajax4jsf.framework.resource.ResourceBuilderImpl;
 import org.ajax4jsf.framework.util.image.ImageInfo;
 import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
 import org.apache.commons.lang.StringUtils;
+import org.richfaces.component.events.NodeExpandedEvent;
+import org.richfaces.component.events.NodeExpandedListener;
+import org.richfaces.component.events.NodeSelectedEvent;
+import org.richfaces.component.events.NodeSelectedListener;
+import org.richfaces.component.state.events.ExpandAllCommandEvent;
+import org.richfaces.component.state.events.TreeStateCommandEvent;
 import org.richfaces.component.xml.XmlTreeDataBuilder;
 import org.xml.sax.InputSource;
 
@@ -91,7 +106,8 @@
     private UICommand command = null;
 	private UIInput input = null;
 	private UIForm form = null;
-	private UIComponent tree = null;
+	private UITree tree = null;
+	private UITreeNode treeNode = null;
 	
     /**
      * Create the test case
@@ -125,9 +141,9 @@
 		
 		form.getChildren().add(command);
 
-		tree = application.createComponent(UITree.COMPONENT_TYPE);
+		tree = (UITree) application.createComponent(UITree.COMPONENT_TYPE);
 		
-		((UITree) tree).setValue(
+		tree.setValue(
 				XmlTreeDataBuilder.build(
 						new InputSource(
 								this.getClass().
@@ -135,11 +151,14 @@
 								)));
 		
 		form.getChildren().add(tree);
-		((UITree) tree).queueExpandAll();
+		tree.queueExpandAll();
+
+		treeNode = (UITreeNode) application.createComponent(UITreeNode.COMPONENT_TYPE);
+		treeNode.setType("node");
+    
+		tree.getChildren().add(treeNode);
     }
 
-    
-    
     public void tearDown() throws Exception {
 		super.tearDown();
 		
@@ -147,6 +166,7 @@
 		this.form = null;
 		this.command = null;
 		this.tree = null;
+		this.treeNode = null;
     }
 
 	/**
@@ -156,8 +176,8 @@
     public void testComponent() throws Exception
     {
     	HtmlPage renderedView = renderView();
-    	System.out.println(renderedView.getWebResponse().getContentAsString());
-    	
+    	//System.out.println(renderedView.getWebResponse().getContentAsString());
+/*    	
     	HtmlInput htmlInput = (HtmlInput) renderedView.getHtmlElementById(input.getClientId(facesContext));
     	htmlInput.setValueAttribute("testInput");
     	
@@ -171,8 +191,6 @@
 			externalContext.addRequestParameterMap((String) keyValue.getKey(), (String) keyValue.getValue());
 		}
     	
-    	System.out.println(this.webConnection.getLastParameters());
-    	
     	UIViewRoot root = facesContext.getViewRoot();
     	root.processDecodes(facesContext);
     	root.processValidators(facesContext);
@@ -180,7 +198,7 @@
     	root.processApplication(facesContext);
     	
     	renderedView = renderView();
-    	System.out.println(renderedView.getWebResponse().getContentAsString());
+*/
     }
     
     public void testRenderStyle() throws Exception {
@@ -266,5 +284,442 @@
     
     public void testProcess() {
     }
+
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITreeNode#addChangeExpandListener(org.richfaces.component.events.NodeExpandedListener)}.
+	 */
+	public final void testAddChangeExpandListener() {
+		NodeExpandedListener listener = new NodeExpandedListener() {
+
+			public void processExpansion(NodeExpandedEvent nodeExpandedEvent)
+					throws AbortProcessingException {
+			}
+			
+		};
+		assertTrue(tree.getChangeExpandListeners().length == 0);
+		assertTrue(treeNode.getChangeExpandListeners().length == 0);
+
+		tree.addChangeExpandListener(listener);
+		treeNode.addChangeExpandListener(listener);
+
+		assertTrue(tree.getChangeExpandListeners().length == 1);
+		assertTrue(treeNode.getChangeExpandListeners().length == 1);
+
+		assertSame(listener, tree.getChangeExpandListeners()[0]);
+		assertSame(listener, treeNode.getChangeExpandListeners()[0]);
+
+		tree.removeChangeExpandListener(listener);
+		treeNode.removeChangeExpandListener(listener);
+
+		assertTrue(tree.getChangeExpandListeners().length == 0);
+		assertTrue(treeNode.getChangeExpandListeners().length == 0);
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITreeNode#addNodeSelectListener(org.richfaces.component.events.NodeSelectedListener)}.
+	 */
+	public final void testAddNodeSelectListener() {
+		NodeSelectedListener listener = new NodeSelectedListener() {
+
+			public void processSelection(NodeSelectedEvent nodeSelectedEvent)
+					throws AbortProcessingException {
+			}
+			
+		};
+		assertTrue(tree.getNodeSelectListeners().length == 0);
+		assertTrue(treeNode.getNodeSelectListeners().length == 0);
+
+		tree.addNodeSelectListener(listener);
+		treeNode.addNodeSelectListener(listener);
+
+		assertTrue(tree.getNodeSelectListeners().length == 1);
+		assertTrue(treeNode.getNodeSelectListeners().length == 1);
+
+		assertSame(listener, tree.getNodeSelectListeners()[0]);
+		assertSame(listener, treeNode.getNodeSelectListeners()[0]);
+
+		tree.removeNodeSelectListener(listener);
+		treeNode.removeNodeSelectListener(listener);
+
+		assertTrue(tree.getNodeSelectListeners().length == 0);
+		assertTrue(treeNode.getNodeSelectListeners().length == 0);
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITreeNode#getUITree()}.
+	 */
+	public final void testGetUITree() {
+		assertSame(tree, treeNode.getUITree());
+		UITreeNode treeNode2 = (UITreeNode) application.createComponent(UITreeNode.COMPONENT_TYPE);
+		UIOutput output = new UIOutput();
+		tree.getChildren().add(output);
+		output.getChildren().add(treeNode2);
+		try {
+			treeNode2.getUITree();
+			
+			fail();
+		} catch (Exception e) {
+		}
+
+		UITreeNode treeNode3 = (UITreeNode) application.createComponent(UITreeNode.COMPONENT_TYPE);
+		assertNull(treeNode3.getUITree());
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITreeNode#addDropListener(org.ajax4jsf.dnd.event.DropListener)}.
+	 */
+	public final void testAddDropListener() {
+		DropListener listener = new DropListener() {
+
+			public void processDrop(DropEvent event) {
+			}
+			
+		};
+		assertTrue(tree.getDropListeners().length == 0);
+		assertTrue(treeNode.getDropListeners().length == 0);
+
+		tree.addDropListener(listener);
+		treeNode.addDropListener(listener);
+
+		assertTrue(tree.getDropListeners().length == 1);
+		assertTrue(treeNode.getDropListeners().length == 1);
+
+		assertSame(listener, tree.getDropListeners()[0]);
+		assertSame(listener, treeNode.getDropListeners()[0]);
+	
+		tree.removeDropListener(listener);
+		treeNode.removeDropListener(listener);
+
+		assertTrue(tree.getDropListeners().length == 0);
+		assertTrue(treeNode.getDropListeners().length == 0);
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITreeNode#addDragListener(org.ajax4jsf.dnd.event.DragListener)}.
+	 */
+	public final void testAddDragListener() {
+		DragListener listener = new DragListener() {
+
+			public void processDrag(DragEvent event) {
+			}
+			
+		};
+		assertTrue(tree.getDragListeners().length == 0);
+		assertTrue(treeNode.getDragListeners().length == 0);
+
+		tree.addDragListener(listener);
+		treeNode.addDragListener(listener);
+
+		assertTrue(tree.getDragListeners().length == 1);
+		assertTrue(treeNode.getDragListeners().length == 1);
+
+		assertSame(listener, tree.getDragListeners()[0]);
+		assertSame(listener, treeNode.getDragListeners()[0]);
+	
+		tree.removeDragListener(listener);
+		treeNode.removeDragListener(listener);
+
+		assertTrue(tree.getDragListeners().length == 0);
+		assertTrue(treeNode.getDragListeners().length == 0);
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITreeNode#getAttributes()}.
+	 */
+	public final void testGetAttributes() {
+		assertSame(tree.getAttributes(), tree.getOrCreateDefaultFacet().getAttributes());
+		assertNotSame(tree.getAttributes(), treeNode.getAttributes());
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITreeNode#getDragValue()}.
+	 */
+	public final void testGetDragValue() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITreeNode#getDropValue()}.
+	 */
+	public final void testGetDropValue() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#resetDataModel()}.
+	 */
+	public final void testResetDataModel() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#getTreeNode()}.
+	 */
+	public final void testGetTreeNode() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#queueEvent(javax.faces.event.FacesEvent)}.
+	 */
+	public final void testQueueEventFacesEvent() {
+		NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
+		NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree);
+		ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
+		DragEvent dragEvent = new DragEvent(tree);
+		DropEvent dropEvent = new DropEvent(tree);
+
+		tree.queueEvent(nodeExpandedEvent);
+		tree.queueEvent(nodeSelectedEvent);
+		tree.queueEvent(expandAllCommandEvent);
+		tree.queueEvent(dragEvent);
+		tree.queueEvent(dropEvent);
+
+		assertEquals(PhaseId.INVOKE_APPLICATION, nodeExpandedEvent.getPhaseId());
+		assertEquals(PhaseId.UPDATE_MODEL_VALUES, nodeSelectedEvent.getPhaseId());
+		assertEquals(PhaseId.INVOKE_APPLICATION, expandAllCommandEvent.getPhaseId());
+		assertEquals(PhaseId.INVOKE_APPLICATION, dragEvent.getPhaseId());
+		assertEquals(PhaseId.INVOKE_APPLICATION, dropEvent.getPhaseId());
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#queueEvent(javax.faces.event.FacesEvent)}.
+	 */
+	public final void testQueueEventFacesEventImmediate() {
+		tree.setImmediate(true);
+
+		NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
+		NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree);
+		ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
+		DragEvent dragEvent = new DragEvent(tree);
+		DropEvent dropEvent = new DropEvent(tree);
+
+		tree.queueEvent(nodeExpandedEvent);
+		tree.queueEvent(nodeSelectedEvent);
+		tree.queueEvent(expandAllCommandEvent);
+		tree.queueEvent(dragEvent);
+		tree.queueEvent(dropEvent);
+
+		assertEquals(PhaseId.APPLY_REQUEST_VALUES, nodeExpandedEvent.getPhaseId());
+		assertEquals(PhaseId.APPLY_REQUEST_VALUES, nodeSelectedEvent.getPhaseId());
+		assertEquals(PhaseId.APPLY_REQUEST_VALUES, expandAllCommandEvent.getPhaseId());
+		assertEquals(PhaseId.APPLY_REQUEST_VALUES, dragEvent.getPhaseId());
+		assertEquals(PhaseId.APPLY_REQUEST_VALUES, dropEvent.getPhaseId());
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#getNodeFacet()}.
+	 */
+	public final void testGetNodeFacet() {
+		tree.setNodeFace("node");
+		assertSame(treeNode, tree.getNodeFacet());
+	}
+
+	public final void testGetOrCreateNodeFacet1() {
+		tree.setNodeFace(null);
+		assertNotNull(tree.getOrCreateDefaultFacet());
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#getNodeFacet()}.
+	 */
+	public final void testGetOrCreateNodeFacet2() {
+		tree.setNodeFace("node1");
+		assertNotNull(tree.getOrCreateDefaultFacet());
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#walk(javax.faces.context.FacesContext, org.ajax4jsf.ajax.repeat.DataVisitor)}.
+	 */
+	public final void testWalkFacesContextDataVisitor() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#walk(javax.faces.context.FacesContext, org.ajax4jsf.ajax.repeat.DataVisitor, org.richfaces.component.TreeRowKey, java.lang.Object)}.
+	 */
+	public final void testWalkFacesContextDataVisitorTreeRowKeyObject() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#walkModel(javax.faces.context.FacesContext, org.ajax4jsf.ajax.repeat.DataVisitor, org.richfaces.component.TreeRowKey, java.lang.Object)}.
+	 */
+	public final void testWalkModel() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#processDecodes(javax.faces.context.FacesContext)}.
+	 */
+	public final void testProcessDecodesFacesContext() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#dataChildren()}.
+	 */
+	public final void testDataChildren() {
+		UIOutput output = new UIOutput();
+		UIInput input = new UIInput();
+		UIInput input1 = new UIInput();
+
+		treeNode.getChildren().add(output);
+		treeNode.getChildren().add(input);
+
+		UITreeNode defaultFacet = tree.getOrCreateDefaultFacet();
+		defaultFacet.getChildren().add(input1);
+
+		tree.setNodeFace("node");
+		
+		Iterator dataChildren = tree.dataChildren();
+		assertTrue(dataChildren.hasNext());
+		assertSame(treeNode, dataChildren.next());
+		assertFalse(dataChildren.hasNext());
+	
+		tree.setNodeFace("");
+		dataChildren = tree.dataChildren();
+		assertTrue(dataChildren.hasNext());
+		assertSame(defaultFacet, dataChildren.next());
+		assertFalse(dataChildren.hasNext());
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#isLeaf()}.
+	 */
+	public final void testIsLeaf() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#isExpanded()}.
+	 */
+	public final void testIsExpanded() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#isSelected()}.
+	 */
+	public final void testIsSelected() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#fixedChildren()}.
+	 */
+	public final void testFixedChildren() {
+		Iterator fixedChildren = tree.fixedChildren();
+		assertFalse(fixedChildren.hasNext());
+		
+		UIInput input = new UIInput();
+		UIOutput output = new UIOutput();
+		tree.getFacets().put("facet1", input);
+		tree.getFacets().put("facet2", output);
+	
+		fixedChildren = tree.fixedChildren();
+		List children = new ArrayList();
+		
+		assertTrue(fixedChildren.hasNext());
+		children.add(fixedChildren.next());
+		assertTrue(fixedChildren.hasNext());
+		children.add(fixedChildren.next());
+		assertFalse(fixedChildren.hasNext());
+		
+		assertTrue(children.contains(input));
+		assertTrue(children.contains(output));
+		assertEquals(2, children.size());
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#createComponentState()}.
+	 */
+	public final void testCreateComponentState() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#isStopInCollapsed()}.
+	 */
+	public final void testIsStopInCollapsed() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#broadcast(javax.faces.event.FacesEvent)}.
+	 */
+	public final void testBroadcastFacesEvent() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#hasAjaxSubmitSelection()}.
+	 */
+	public final void testHasAjaxSubmitSelection() {
+		assertTrue(tree.isAjaxSubmitSelection() == tree.hasAjaxSubmitSelection());
+		assertFalse(tree.isAjaxSubmitSelection());
+		assertFalse(treeNode.hasAjaxSubmitSelection());
+
+		treeNode.setAjaxSubmitSelection("true");
+		assertTrue(treeNode.hasAjaxSubmitSelection());
+
+		treeNode.setAjaxSubmitSelection("inherit");
+		assertFalse(treeNode.hasAjaxSubmitSelection());
+		
+		tree.setAjaxSubmitSelection(true);
+		assertTrue(tree.isAjaxSubmitSelection() == tree.hasAjaxSubmitSelection());
+		assertTrue(tree.isAjaxSubmitSelection());
+	
+		assertTrue(treeNode.hasAjaxSubmitSelection());
+		
+		treeNode.setAjaxSubmitSelection("false");
+		assertTrue(tree.isAjaxSubmitSelection());
+		assertFalse(treeNode.hasAjaxSubmitSelection());
+	
+		treeNode.setAjaxSubmitSelection(null);
+		treeNode.hasAjaxSubmitSelection();
+		assertTrue(treeNode.hasAjaxSubmitSelection());
+
+		treeNode.setAjaxSubmitSelection("");
+		treeNode.hasAjaxSubmitSelection();
+		assertTrue(treeNode.hasAjaxSubmitSelection());
+
+		try {
+			treeNode.setAjaxSubmitSelection("untrue");
+			treeNode.hasAjaxSubmitSelection();
+			
+			fail();
+		} catch (IllegalArgumentException e) {
+		}
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#createDataModel()}.
+	 */
+	public final void testCreateDataModel() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#queueNodeExpand(org.richfaces.component.TreeRowKey)}.
+	 */
+	public final void testQueueNodeExpand() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#queueNodeCollapse(org.richfaces.component.TreeRowKey)}.
+	 */
+	public final void testQueueNodeCollapse() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#queueExpandAll()}.
+	 */
+	public final void testQueueExpandAll() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#queueCollapseAll()}.
+	 */
+	public final void testQueueCollapseAll() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#getRowData(java.lang.Object)}.
+	 */
+	public final void testGetRowDataObject() {
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.component.UITree#getTreeNode(java.lang.Object)}.
+	 */
+	public final void testGetTreeNodeObject() {
+	}
 }
 




More information about the richfaces-svn-commits mailing list