aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2016-02-04 15:45:40 +0200
committerTeemu Suo-Anttila <teemusa@vaadin.com>2016-02-04 15:45:40 +0200
commit9d42af60ad77b5cf1ad619af4630d1206ad0025c (patch)
tree4919f430bae9dd4b737af7db7cbf73bb4f85ef06
parented3fd8a20855d4bdbaa3f0e54534c93e649a8e50 (diff)
downloadvaadin-framework-9d42af60ad77b5cf1ad619af4630d1206ad0025c.tar.gz
vaadin-framework-9d42af60ad77b5cf1ad619af4630d1206ad0025c.zip
Fix key and active data mapping when adding a data object
Change-Id: Ibfaf4b62673c008b94e039deb77f6f6d73d83753
-rw-r--r--client/src/com/vaadin/client/connectors/data/typed/DataSourceConnector.java1
-rw-r--r--server/src/com/vaadin/server/communication/data/typed/SimpleDataProvider.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/connectors/data/typed/DataSourceConnector.java b/client/src/com/vaadin/client/connectors/data/typed/DataSourceConnector.java
index 8f9527c8e0..b63bf6e281 100644
--- a/client/src/com/vaadin/client/connectors/data/typed/DataSourceConnector.java
+++ b/client/src/com/vaadin/client/connectors/data/typed/DataSourceConnector.java
@@ -88,6 +88,7 @@ public class DataSourceConnector extends AbstractExtensionConnector {
@Override
public void add(JsonObject dataObject) {
ds.asList().add(dataObject);
+ keyToJson.put(getKey(dataObject), dataObject);
}
@Override
diff --git a/server/src/com/vaadin/server/communication/data/typed/SimpleDataProvider.java b/server/src/com/vaadin/server/communication/data/typed/SimpleDataProvider.java
index 9fba28e59a..91a7772ae3 100644
--- a/server/src/com/vaadin/server/communication/data/typed/SimpleDataProvider.java
+++ b/server/src/com/vaadin/server/communication/data/typed/SimpleDataProvider.java
@@ -15,6 +15,7 @@
*/
package com.vaadin.server.communication.data.typed;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -138,6 +139,7 @@ public class SimpleDataProvider<T> extends DataProvider<T> {
*/
protected void add(T data) {
rpc.add(getDataObject(data));
+ handler.addActiveData(Collections.singleton(data));
}
/**