summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2016-01-22 14:23:55 +0200
committerHenri Sara <hesara@vaadin.com>2016-02-13 13:09:52 +0000
commitd004aa1f8bbcc30ab58663b29c4945116256bb53 (patch)
treec39bd4058af4543bd3abeaddd857a490a65477f4 /server
parentae0d2bd61cb82a524e4ef810de21f0bc72aecc93 (diff)
downloadvaadin-framework-d004aa1f8bbcc30ab58663b29c4945116256bb53.tar.gz
vaadin-framework-d004aa1f8bbcc30ab58663b29c4945116256bb53.zip
Fix Components cleanup on Header/FooterRow remove in Grid (#19497)
Change-Id: I596d0cc13b782398b4c5c8338b8370e69862ea88
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/ui/Grid.java11
1 files changed, 11 insertions, 0 deletions
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();