From d004aa1f8bbcc30ab58663b29c4945116256bb53 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Fri, 22 Jan 2016 14:23:55 +0200 Subject: Fix Components cleanup on Header/FooterRow remove in Grid (#19497) Change-Id: I596d0cc13b782398b4c5c8338b8370e69862ea88 --- server/src/com/vaadin/ui/Grid.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'server/src/com/vaadin/ui') diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index 06ab8d1581..4074672675 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -2467,6 +2467,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, } abstract protected String getCellTagName(); + + void detach() { + for (CELLTYPE cell : cells.values()) { + cell.detach(); + } + } } /** @@ -2674,6 +2680,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, .html())); } } + + void detach() { + removeComponentIfPresent(); + } } protected Grid grid; @@ -2720,6 +2730,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, + rowIndex); } ROWTYPE row = rows.remove(rowIndex); + row.detach(); getSectionState().rows.remove(rowIndex); markAsDirty(); -- cgit v1.2.3