diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-03-09 16:26:44 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-03-09 16:26:44 +0000 |
commit | 92ff35ef896461d6053ede69bd1b74bd983e9d3f (patch) | |
tree | c67df2b6f451b30819671e83d868347160399153 /src/com/vaadin/data/util/ContainerHierarchicalWrapper.java | |
parent | 40c65cf063651a686855b5e99a6b7821f841d195 (diff) | |
download | vaadin-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.java | 9 |
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); } |