diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/data/provider/DataCommunicator.java | 18 |
1 files changed, 9 insertions, 9 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 bb76d7cdcb..449cbc5711 100644 --- a/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java +++ b/server/src/main/java/com/vaadin/data/provider/DataCommunicator.java @@ -358,6 +358,15 @@ public class DataCommunicator<T> extends AbstractExtension { rpc.reset(getDataProviderSize()); } + if (!updatedData.isEmpty()) { + JsonArray dataArray = Json.createArray(); + int i = 0; + for (T data : updatedData) { + dataArray.set(i++, getDataObject(data)); + } + rpc.updateData(dataArray); + } + Range requestedRows = getPushRows(); boolean triggerReset = false; if (!requestedRows.isEmpty()) { @@ -373,15 +382,6 @@ public class DataCommunicator<T> extends AbstractExtension { pushData(offset, rowsToPush); } - if (!updatedData.isEmpty()) { - JsonArray dataArray = Json.createArray(); - int i = 0; - for (T data : updatedData) { - dataArray.set(i++, getDataObject(data)); - } - rpc.updateData(dataArray); - } - setPushRows(Range.withLength(0, 0)); reset = triggerReset; updatedData.clear(); |