Author: nbelaevski
Date: 2008-07-14 11:55:00 -0400 (Mon, 14 Jul 2008)
New Revision: 9581
Modified:
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
Log:
Tree DnD Enhancements
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-07-14 15:54:06
UTC (rev 9580)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-07-14 15:55:00
UTC (rev 9581)
@@ -1212,6 +1212,10 @@
public void addNode(Object parentRowKey, TreeNode draggedNode, Object id, Object state)
{
addNode(getFacesContext(), parentRowKey, draggedNode, id, state);
}
+
+ public Object getParentRowKey(Object rowKey) {
+ return ((AbstractTreeDataModel) getExtendedDataModel()).getParentRowKey(rowKey);
+ }
}
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2008-07-14
15:54:06 UTC (rev 9580)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2008-07-14
15:55:00 UTC (rev 9581)
@@ -423,7 +423,7 @@
tree.setRowKey(context, key);
- if (tree.isRowAvailable()) {
+ if (key == null || tree.isRowAvailable()) {
String treeClientId;
if (key == null) {
treeClientId = tree.getClientId(context);
Show replies by date