diff options
Diffstat (limited to 'server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java')
-rw-r--r-- | server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java b/server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java index 0bfec33957..199d186fab 100644 --- a/server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java +++ b/server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java @@ -450,6 +450,8 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, // Update parent parent.remove(itemId); + fireItemSetChangeIfAbstractContainer(); + return true; } @@ -490,10 +492,22 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, } } + fireItemSetChangeIfAbstractContainer(); + return true; } /** + * inform container (if it is instance of AbstractContainer) about the + * change in hierarchy (#15421) + */ + private void fireItemSetChangeIfAbstractContainer() { + if (container instanceof AbstractContainer) { + ((AbstractContainer) container).fireItemSetChange(); + } + } + + /** * Creates a new Item into the Container, assigns it an automatic ID, and * adds it to the hierarchy. * |