summaryrefslogtreecommitdiffstats
path: root/server/src/com
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-08-21 14:17:17 +0300
committerVaadin Code Review <review@vaadin.com>2015-08-21 12:33:15 +0000
commit5db6f100da4c66ce394dffdfe16689be188314f1 (patch)
tree100e54973df6c51e874101533c2151c33de329d2 /server/src/com
parentd40df1dc68f166bc23609d631420a34d1a0f2adf (diff)
downloadvaadin-framework-5db6f100da4c66ce394dffdfe16689be188314f1.tar.gz
vaadin-framework-5db6f100da4c66ce394dffdfe16689be188314f1.zip
Fix AbstractRemoteDataSource cache clearing (#18630)
This patch also reduces the amount of RPC calls when dropping rows from cache. Change-Id: Ib69a807883bc885dcd877a008cec16e44fa2bfdd
Diffstat (limited to 'server/src/com')
-rw-r--r--server/src/com/vaadin/data/RpcDataProviderExtension.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/com/vaadin/data/RpcDataProviderExtension.java b/server/src/com/vaadin/data/RpcDataProviderExtension.java
index 403cc4c016..2ec100eba6 100644
--- a/server/src/com/vaadin/data/RpcDataProviderExtension.java
+++ b/server/src/com/vaadin/data/RpcDataProviderExtension.java
@@ -123,7 +123,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
* the item ids for which to get keys
* @return keys for the {@code itemIds}
*/
- public List<String> getKeys(Collection<Object> itemIds) {
+ public List<String> getKeys(Collection<?> itemIds) {
if (itemIds == null) {
throw new IllegalArgumentException("itemIds can't be null");
}
@@ -698,8 +698,11 @@ public class RpcDataProviderExtension extends AbstractExtension {
}
@Override
- public void dropRow(String rowKey) {
- activeItemHandler.dropActiveItem(keyMapper.getItemId(rowKey));
+ public void dropRows(JsonArray rowKeys) {
+ for (int i = 0; i < rowKeys.length(); ++i) {
+ activeItemHandler.dropActiveItem(keyMapper
+ .getItemId(rowKeys.getString(i)));
+ }
}
});