summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2010-03-09 16:26:44 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2010-03-09 16:26:44 +0000
commit92ff35ef896461d6053ede69bd1b74bd983e9d3f (patch)
treec67df2b6f451b30819671e83d868347160399153 /src/com/vaadin/data/util/ContainerHierarchicalWrapper.java
parent40c65cf063651a686855b5e99a6b7821f841d195 (diff)
downloadvaadin-framework-92ff35ef896461d6053ede69bd1b74bd983e9d3f.tar.gz
vaadin-framework-92ff35ef896461d6053ede69bd1b74bd983e9d3f.zip
fixes #4292 for ContainerHierarchicalWrapper
svn changeset:11728/svn branch:6.3
Diffstat (limited to 'src/com/vaadin/data/util/ContainerHierarchicalWrapper.java')
-rw-r--r--src/com/vaadin/data/util/ContainerHierarchicalWrapper.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java b/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java
index e692f11498..03be24b669 100644
--- a/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java
+++ b/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java
@@ -181,6 +181,14 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
*/
private void removeFromHierarchyWrapper(Object itemId) {
+ LinkedList<Object> oprhanedChildren = children.remove(itemId);
+ if (oprhanedChildren != null) {
+ for (Object object : oprhanedChildren) {
+ // make orphaned children root nodes
+ setParent(object, null);
+ }
+ }
+
if (isRoot(itemId)) {
roots.remove(itemId);
}
@@ -192,7 +200,6 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
}
}
parent.remove(itemId);
- children.remove(itemId);
noChildrenAllowed.remove(itemId);
}