diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-07-22 14:50:26 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-08-18 08:34:28 +0000 |
commit | 15ad8bccfc9073cdf1e587f7f7dd6e1f3f27c43f (patch) | |
tree | fc847dee42affb67856813772555c6805a5e9e2d /shared | |
parent | e7fda93b300b11d9507f25917306e1f3d57cb27c (diff) | |
download | vaadin-framework-15ad8bccfc9073cdf1e587f7f7dd6e1f3f27c43f.tar.gz vaadin-framework-15ad8bccfc9073cdf1e587f7f7dd6e1f3f27c43f.zip |
Fix RpcDataProviderExtension to not rely on item indices (#18503)
Change-Id: I68a77bee4ef8e7a859f3a3c143e6f5922decf025
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/com/vaadin/shared/data/DataProviderRpc.java | 12 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/data/DataRequestRpc.java | 14 |
2 files changed, 25 insertions, 1 deletions
diff --git a/shared/src/com/vaadin/shared/data/DataProviderRpc.java b/shared/src/com/vaadin/shared/data/DataProviderRpc.java index 4bfdb8b6c5..bddbdd113d 100644 --- a/shared/src/com/vaadin/shared/data/DataProviderRpc.java +++ b/shared/src/com/vaadin/shared/data/DataProviderRpc.java @@ -20,6 +20,7 @@ import com.vaadin.shared.annotations.NoLayout; import com.vaadin.shared.communication.ClientRpc; import elemental.json.JsonArray; +import elemental.json.JsonObject; /** * RPC interface used for pushing container data to the client. @@ -91,4 +92,15 @@ public interface DataProviderRpc extends ClientRpc { * the size of the new data set */ public void resetDataAndSize(int size); + + /** + * Informs the client that a row has updated. The client-side DataSource + * will map the given data to correct index if it should be in the cache. + * + * @since + * @param row + * the updated row data + */ + @NoLayout + public void updateRowData(JsonObject row); } diff --git a/shared/src/com/vaadin/shared/data/DataRequestRpc.java b/shared/src/com/vaadin/shared/data/DataRequestRpc.java index 0d9b919a4e..84216f0fab 100644 --- a/shared/src/com/vaadin/shared/data/DataRequestRpc.java +++ b/shared/src/com/vaadin/shared/data/DataRequestRpc.java @@ -16,8 +16,8 @@ package com.vaadin.shared.data; -import com.vaadin.shared.annotations.NoLoadingIndicator; import com.vaadin.shared.annotations.Delayed; +import com.vaadin.shared.annotations.NoLoadingIndicator; import com.vaadin.shared.communication.ServerRpc; /** @@ -55,5 +55,17 @@ public interface DataRequestRpc extends ServerRpc { * pinned status of referenced item */ @Delayed + @NoLoadingIndicator public void setPinned(String key, boolean isPinned); + + /** + * Informs the server that an item is dropped from the client cache. + * + * @since + * @param rowKey + * key mapping to item + */ + @Delayed + @NoLoadingIndicator + public void dropRow(String rowKey); } |