Author: nbelaevski
Date: 2007-08-31 12:31:59 -0400 (Fri, 31 Aug 2007)
New Revision: 2667
Modified:
trunk/ui/treeModel/src/main/config/component/recursiveTreeNodes.xml
trunk/ui/treeModel/src/main/config/component/treeNodes.xml
trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java
trunk/ui/treeModel/src/main/java/org/richfaces/component/UITreeNodes.java
Log:
http://jira.jboss.com/jira/browse/RF-768
Modified: trunk/ui/treeModel/src/main/config/component/recursiveTreeNodes.xml
===================================================================
--- trunk/ui/treeModel/src/main/config/component/recursiveTreeNodes.xml 2007-08-31
16:30:28 UTC (rev 2666)
+++ trunk/ui/treeModel/src/main/config/component/recursiveTreeNodes.xml 2007-08-31
16:31:59 UTC (rev 2667)
@@ -49,28 +49,23 @@
</description>
</property>
<property elonly="true">
- <name>root</name>
+ <name>roots</name>
<classname>java.lang.Object</classname>
<description>
</description>
</property>
- <property hidden="true">
- <name>activeBoth</name>
+ <property>
+ <name>included</name>
<classname>boolean</classname>
<defaultvalue>true</defaultvalue>
</property>
- <property exist="true">
- <name>active</name>
- <classname>boolean</classname>
- <defaultvalue>true</defaultvalue>
- </property>
<property>
- <name>activeRoot</name>
+ <name>includedRoot</name>
<classname>boolean</classname>
<defaultvalue>true</defaultvalue>
</property>
<property>
- <name>activeNodes</name>
+ <name>includedNode</name>
<classname>boolean</classname>
<defaultvalue>true</defaultvalue>
</property>
Modified: trunk/ui/treeModel/src/main/config/component/treeNodes.xml
===================================================================
--- trunk/ui/treeModel/src/main/config/component/treeNodes.xml 2007-08-31 16:30:28 UTC
(rev 2666)
+++ trunk/ui/treeModel/src/main/config/component/treeNodes.xml 2007-08-31 16:31:59 UTC
(rev 2667)
@@ -49,7 +49,7 @@
</description>
</property>
<property>
- <name>active</name>
+ <name>includedNode</name>
<classname>boolean</classname>
<defaultvalue>true</defaultvalue>
</property>
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-31
16:30:28 UTC (rev 2666)
+++
trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java 2007-08-31
16:31:59 UTC (rev 2667)
@@ -6,8 +6,6 @@
import java.util.Iterator;
-import javax.faces.el.ValueBinding;
-
import org.apache.commons.collections.iterators.IteratorChain;
import org.richfaces.model.StackingTreeModel;
import org.richfaces.model.StackingTreeModelDataProvider;
@@ -24,36 +22,21 @@
public static final String COMPONENT_FAMILY =
"org.richfaces.RecursiveTreeNodes";
- public abstract Object getRoot();
- public abstract void setRoot(Object root);
+ public abstract Object getRoots();
+ public abstract void setRoots(Object roots);
- public abstract boolean isActiveBoth();
- public abstract void setActiveBoth(boolean active);
+ public abstract boolean isIncluded();
+ public abstract void setIncluded(boolean active);
- public abstract boolean isActiveRoot();
- public abstract void setActiveRoot(boolean active);
+ public abstract boolean isIncludedRoot();
+ public abstract void setIncludedRoot(boolean active);
- public abstract boolean isActiveNodes();
- public abstract void setActiveNodes(boolean active);
-
- public boolean isActive() {
- return isActiveBoth() && isActiveRoot();
+ protected boolean includeNode() {
+ return isIncluded() && isIncludedRoot();
}
-
- public void setActive(boolean active) {
- setActiveBoth(active);
- }
- public void setValueBinding(String name, ValueBinding binding) {
- if ("active".equals(name)) {
- super.setValueBinding("activeBoth", binding);
- } else {
- super.setValueBinding(name, binding);
- }
- }
-
public Object getData() {
- return getRoot();
+ return getRoots();
}
public abstract String getVar();
@@ -92,7 +75,7 @@
}
protected boolean isActiveData() {
- return UIRecursiveTreeNodes.this.isActiveBoth() &&
UIRecursiveTreeNodes.this.isActiveNodes();
+ return UIRecursiveTreeNodes.this.isIncluded() &&
UIRecursiveTreeNodes.this.isIncludedNode();
}
};
stackingModel.addStackingModel(recursiveModel);
Modified: trunk/ui/treeModel/src/main/java/org/richfaces/component/UITreeNodes.java
===================================================================
--- trunk/ui/treeModel/src/main/java/org/richfaces/component/UITreeNodes.java 2007-08-31
16:30:28 UTC (rev 2666)
+++ trunk/ui/treeModel/src/main/java/org/richfaces/component/UITreeNodes.java 2007-08-31
16:31:59 UTC (rev 2667)
@@ -23,9 +23,13 @@
public abstract String getVar();
public abstract void setVar(String var);
- public abstract boolean isActive();
- public abstract void setActive(boolean active);
+ public abstract boolean isIncludedNode();
+ public abstract void setIncludedNode(boolean includeNode);
+ protected boolean includeNode() {
+ return isIncludedNode();
+ }
+
protected StackingTreeModel createStackingTreeModel() {
StackingTreeModel treeModel = new VisualStackingTreeModel(getId(), getVar(), new
StackingTreeModelDataProvider() {
@@ -39,7 +43,7 @@
}
protected boolean isActiveData() {
- return UITreeNodes.this.isActive();
+ return UITreeNodes.this.includeNode();
}
};