diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-02-12 09:35:41 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-02-13 12:32:37 +0000 |
commit | 614457a95d24ee7a307f5317d8a26c9876728a6c (patch) | |
tree | d38fc371fec68031fd39f1d8e835d0d544dd4ae0 /server/src/com/vaadin | |
parent | b5fb9c61ee7710558bdedda2ccf4c5e2f9481bff (diff) | |
download | vaadin-framework-614457a95d24ee7a307f5317d8a26c9876728a6c.tar.gz vaadin-framework-614457a95d24ee7a307f5317d8a26c9876728a6c.zip |
Fix Grid DetailsGenerator being removed on Container change (#19593)
Change-Id: Ied328804260b1a7bb35093fca1d972735559cf41
Diffstat (limited to 'server/src/com/vaadin')
-rw-r--r-- | server/src/com/vaadin/ui/Grid.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index 0774afd582..06ab8d1581 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -312,7 +312,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @see #setDetailsGenerator(DetailsGenerator) */ - private DetailsGenerator detailsGenerator = DetailsGenerator.NULL; + private DetailsGenerator detailsGenerator; /** * This map represents all details that are currently visible on the @@ -334,7 +334,13 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, private final Set<Object> openDetails = new HashSet<Object>(); public DetailComponentManager(Grid grid) { + this(grid, DetailsGenerator.NULL); + } + + public DetailComponentManager(Grid grid, + DetailsGenerator detailsGenerator) { super(grid); + setDetailsGenerator(detailsGenerator); } /** @@ -4914,7 +4920,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, } } - detailComponentManager = new DetailComponentManager(this); + if (detailComponentManager != null) { + detailComponentManager = new DetailComponentManager(this, + detailComponentManager.getDetailsGenerator()); + } else { + detailComponentManager = new DetailComponentManager(this); + } /* * selectionModel == null when the invocation comes from the |