Author: nbelaevski
Date: 2007-08-02 12:28:54 -0400 (Thu, 02 Aug 2007)
New Revision: 2020
Modified:
trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java
Log:
StackingTreeModel API: models map changed to getModelById() & getModelsIterator()
UIRecursiveTreeNodes updated to comply changes
Modified:
trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java
===================================================================
---
trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java 2007-08-02
16:11:32 UTC (rev 2019)
+++
trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java 2007-08-02
16:28:54 UTC (rev 2020)
@@ -4,10 +4,11 @@
package org.richfaces.component;
-import java.util.Map;
+import java.util.Iterator;
import javax.faces.context.FacesContext;
+import org.apache.commons.collections.iterators.IteratorChain;
import org.richfaces.model.StackingTreeModel;
import org.richfaces.model.StackingTreeModelDataProvider;
@@ -48,9 +49,22 @@
componentSelected(UIRecursiveTreeNodes.this);
}
- public Map getModels() {
- return this.getParent().getModels();
+ public StackingTreeModel getModelById(String id) {
+ StackingTreeModel model = super.getModelById(id);
+ if (model == null) {
+ model = this.getParent().getModelById(id);
+ }
+
+ return model;
}
+
+ public Iterator getModelsIterator() {
+ IteratorChain chain = new IteratorChain();
+ chain.addIterator(super.getModelsIterator());
+ chain.addIterator(this.getParent().getModelsIterator());
+
+ return chain;
+ }
};
stackingModel.addStackingModel(recursiveModel);
Show replies by date