You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/04/18 14:39:37 UTC

svn commit: r1327483 - /myfaces/tobago/branches/tobago-tree-table/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITree.java

Author: lofwyr
Date: Wed Apr 18 12:39:37 2012
New Revision: 1327483

URL: http://svn.apache.org/viewvc?rev=1327483&view=rev
Log:
TOBAGO-1107: Using a TreeState object instead of "expanded" and "marked" in the tree node tag
TOBAGO-1049: Tree inside of the Sheet (aka TreeTable)

 - fixing action (decode was not called for the children)

Modified:
    myfaces/tobago/branches/tobago-tree-table/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITree.java

Modified: myfaces/tobago/branches/tobago-tree-table/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITree.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-tree-table/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITree.java?rev=1327483&r1=1327482&r2=1327483&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-tree-table/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITree.java (original)
+++ myfaces/tobago/branches/tobago-tree-table/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITree.java Wed Apr 18 12:39:37 2012
@@ -123,7 +123,6 @@ public abstract class AbstractUITree ext
     return TreeSelectable.parse(ComponentUtils.getStringAttribute(this, Attributes.SELECTABLE));
   }
 
-/*
   @Override
   public void processDecodes(FacesContext facesContext) {
 
@@ -131,20 +130,20 @@ public abstract class AbstractUITree ext
       return;
     }
 
-    if (ComponentUtils.isOutputOnly(this)) {
-// XXX     setValid(true);
-    } else {
-      // in tree first decode node and than decode children
-
-      decode(facesContext);
-
-      for (Iterator i = getFacetsAndChildren(); i.hasNext();) {
-        UIComponent uiComponent = ((UIComponent) i.next());
-        uiComponent.processDecodes(facesContext);
+    final int last = hasRows() ? getFirst() + getRows() : Integer.MAX_VALUE;
+    for (int rowIndex = getFirst(); rowIndex < last; rowIndex++) {
+      setRowIndex(rowIndex);
+      if (!isRowAvailable()) {
+        break;
+      }
+      for (UIComponent child : getChildren()) {
+        child.processDecodes(facesContext);
       }
     }
+    setRowIndex(-1);
+
+    decode(facesContext);
   }
-*/
 
 /* XXX
   @Override