summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSun Zhe <31067185+ZheSun88@users.noreply.github.com>2018-12-11 11:08:21 +0200
committerGitHub <noreply@github.com>2018-12-11 11:08:21 +0200
commit96a7c2f99c657c14282fe9a721280d425565d4c6 (patch)
tree72677fafc9f726b653b611979e7bcfee2cf87737 /server
parent5480d82bb8554d3980a55714c6128cfe1d63ec92 (diff)
downloadvaadin-framework-96a7c2f99c657c14282fe9a721280d425565d4c6.tar.gz
vaadin-framework-96a7c2f99c657c14282fe9a721280d425565d4c6.zip
Request data update before client response (#11341)
* Request data update before client response * fix the accidental commit * add tests fixes #11320
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/data/provider/DataCommunicator.java1
-rw-r--r--server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java9
2 files changed, 5 insertions, 5 deletions
diff --git a/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java b/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
index 449cbc5711..35dad20c49 100644
--- a/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
+++ b/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
@@ -530,6 +530,7 @@ public class DataCommunicator<T> extends AbstractExtension {
public void reset() {
// Only needed if a full reset is not pending.
if (!reset) {
+ beforeClientResponse(true);
// Soft reset through client-side re-request.
getClientRpc().reset(getDataProviderSize());
}
diff --git a/server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java b/server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java
index c187c91471..98ae758b6d 100644
--- a/server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java
+++ b/server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java
@@ -1,9 +1,5 @@
package com.vaadin.data.provider;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.concurrent.Future;
@@ -25,6 +21,9 @@ import com.vaadin.ui.UI;
import elemental.json.Json;
import elemental.json.JsonArray;
import elemental.json.JsonObject;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
* @author Vaadin Ltd
@@ -303,7 +302,7 @@ public class DataCommunicatorTest {
// Mark communicator clean
ui.getConnectorTracker().markClean(communicator);
- assertTrue("Communicator should be marked for hard reset",
+ assertFalse("Communicator should not be marked for hard reset",
communicator.reset);
assertFalse("DataCommunicator should not be marked as dirty",
ui.getConnectorTracker().isDirty(communicator));