diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-12-11 10:58:06 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-12-14 08:49:16 +0000 |
commit | 4e0bfcdd1f49050911029383f59ff2f94e82650e (patch) | |
tree | bb03d7b46ea1354ad2fd4531add335c971bacb33 | |
parent | 8a6a6add180523c3b79137283e7cc752305ec0cf (diff) | |
download | vaadin-framework-4e0bfcdd1f49050911029383f59ff2f94e82650e.tar.gz vaadin-framework-4e0bfcdd1f49050911029383f59ff2f94e82650e.zip |
Reapply DataGenerators when container changes (#19357, #19359)
Previously on container change Grid applied only its internal
DataGenerators to the new RpcDataProviderExtension. Now it goes through
all existing Extensions and adds all DataGenerators to the data
provider.
Change-Id: Idbd48e5152867b1d2b7a770741e3ea08aa4299b6
-rw-r--r-- | server/src/com/vaadin/ui/Grid.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index e1c7e894a3..cad02a6ea6 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -4859,6 +4859,11 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, removeExtension(datasourceExtension); } + // Remove old DetailComponentManager + if (detailComponentManager != null) { + detailComponentManager.remove(); + } + resetEditor(); datasource = container; @@ -4893,6 +4898,11 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, datasourceExtension = new RpcDataProviderExtension(container); datasourceExtension.extend(this); datasourceExtension.addDataGenerator(new RowDataGenerator()); + for (Extension e : getExtensions()) { + if (e instanceof DataGenerator) { + datasourceExtension.addDataGenerator((DataGenerator) e); + } + } detailComponentManager = new DetailComponentManager(this); |