Author: nbelaevski
Date: 2008-03-21 12:46:11 -0400 (Fri, 21 Mar 2008)
New Revision: 7071
Modified:
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
Log:
UITree: back compatibility for collections of Swing tree nodes restored
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-03-21 16:41:17
UTC (rev 7070)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-03-21 16:46:11
UTC (rev 7071)
@@ -54,7 +54,6 @@
import org.richfaces.component.state.events.ExpandAllCommandEvent;
import org.richfaces.component.state.events.ExpandNodeCommandEvent;
import org.richfaces.component.state.events.TreeStateCommandEvent;
-import org.richfaces.component.util.MessageUtil;
import org.richfaces.event.DragEvent;
import org.richfaces.event.DragListener;
import org.richfaces.event.DropEvent;
@@ -578,7 +577,7 @@
}
return treeDataModel;
- } else if (value instanceof javax.swing.tree.TreeNode) {
+ } else {
TreeDataModel<javax.swing.tree.TreeNode> swingTreeDataModel = new
SwingTreeDataModel();
swingTreeDataModel.setWrappedData(value);
@@ -587,12 +586,6 @@
}
return swingTreeDataModel;
- } else {
- throw new IllegalArgumentException("Value of tree component " +
- MessageUtil.getLabel(FacesContext.getCurrentInstance(), this) +
- "[" + value + "]" +
- "is not an instance of neither " + TreeNode.class.getName() +
- "nor " + javax.swing.tree.TreeNode.class.getName() + "!");
}
} else {
//TODO implement request caching
Show replies by date