aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/data
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-13 15:46:31 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-13 15:46:31 +0300
commitae5793ae460cab22612c134cbec4b8ae6ed4175b (patch)
treee24c1924cc4882a273707661d16d9a67c875aa31 /server/src/com/vaadin/data
parent40dcbc3cfaa438c9b879720c9012331dd85ca694 (diff)
parent96e10ed8be9ec1e694001098584361e43eb35af2 (diff)
downloadvaadin-framework-ae5793ae460cab22612c134cbec4b8ae6ed4175b.tar.gz
vaadin-framework-ae5793ae460cab22612c134cbec4b8ae6ed4175b.zip
Merge remote-tracking branch 'origin/master' into grid-unbuffered-editor
Change-Id: Id630861d5089b0deabbccffe66d971252c44f46b
Diffstat (limited to 'server/src/com/vaadin/data')
-rw-r--r--server/src/com/vaadin/data/RpcDataProviderExtension.java18
-rw-r--r--server/src/com/vaadin/data/util/converter/StringToCollectionConverter.java4
2 files changed, 19 insertions, 3 deletions
diff --git a/server/src/com/vaadin/data/RpcDataProviderExtension.java b/server/src/com/vaadin/data/RpcDataProviderExtension.java
index 71b597ff1d..55947c98d1 100644
--- a/server/src/com/vaadin/data/RpcDataProviderExtension.java
+++ b/server/src/com/vaadin/data/RpcDataProviderExtension.java
@@ -947,6 +947,14 @@ public class RpcDataProviderExtension extends AbstractExtension {
listener.removeListener();
}
+ // Wipe clean all details.
+ HashSet<Object> detailItemIds = new HashSet<Object>(
+ detailComponentManager.visibleDetailsComponents
+ .keySet());
+ for (Object itemId : detailItemIds) {
+ detailComponentManager.destroyDetails(itemId);
+ }
+
listeners.clear();
activeRowHandler.activeRange = Range.withLength(0, 0);
@@ -1387,4 +1395,14 @@ public class RpcDataProviderExtension extends AbstractExtension {
public DetailComponentManager getDetailComponentManager() {
return detailComponentManager;
}
+
+ @Override
+ public void detach() {
+ for (Object itemId : ImmutableSet
+ .copyOf(detailComponentManager.visibleDetails)) {
+ detailComponentManager.destroyDetails(itemId);
+ }
+
+ super.detach();
+ }
}
diff --git a/server/src/com/vaadin/data/util/converter/StringToCollectionConverter.java b/server/src/com/vaadin/data/util/converter/StringToCollectionConverter.java
index 495bed74f8..b86fec5558 100644
--- a/server/src/com/vaadin/data/util/converter/StringToCollectionConverter.java
+++ b/server/src/com/vaadin/data/util/converter/StringToCollectionConverter.java
@@ -155,9 +155,7 @@ public class StringToCollectionConverter implements
previous = index + delimiter.length();
index = value.indexOf(delimiter, previous);
}
- if (result.size() > 0) {
- collectToken(value.substring(previous), result, converter, locale);
- }
+ collectToken(value.substring(previous), result, converter, locale);
return result;
}