You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/03/20 13:10:13 UTC

svn commit: r387194 - /incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITree.java

Author: weber
Date: Mon Mar 20 04:10:10 2006
New Revision: 387194

URL: http://svn.apache.org/viewcvs?rev=387194&view=rev
Log:
fix for TOBAGO-45 (UITree looses config when rerendering view)

Modified:
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITree.java

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITree.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITree.java?rev=387194&r1=387193&r2=387194&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITree.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITree.java Mon Mar 20 04:10:10 2006
@@ -337,11 +337,14 @@
     // TODO: updateing the model here and *NOT* in the decode phase
   }
 
-
   public Object saveState(FacesContext context) {
-    Object[] state = new Object[2];
+    Object[] state = new Object[6];
     state[0] = super.saveState(context);
     state[1] = saveAttachedState(context, actionListenerBinding);
+    state[2] = showJunctionsSet ? showJunctions : null;
+    state[3] = showIconsSet ? showIcons : null;
+    state[4] = showRootSet ? showRoot : null;
+    state[5] = showRootJunctionSet ? showRootJunction : null;
     return state;
   }
 
@@ -349,6 +352,22 @@
     Object[] values = (Object[]) state;
     super.restoreState(context, values[0]);
     actionListenerBinding = (MethodBinding) restoreAttachedState(context, values[1]);
+    if (values[2] != null) {
+      showJunctions = (Boolean) values[2];
+      showJunctionsSet = true;
+    }
+    if (values[3] != null) {
+      showIcons = (Boolean) values[3];
+      showIconsSet = true;
+    }
+    if (values[4] != null) {
+      showRoot = (Boolean) values[4];
+      showRootSet = true;
+    }
+    if (values[5] != null) {
+      showRootJunction = (Boolean) values[5];
+      showRootJunctionSet = true;
+    }
   }
 
   public Command[] getCommands() {