summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/com/vaadin/data/RpcDataProviderExtension.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/src/com/vaadin/data/RpcDataProviderExtension.java b/server/src/com/vaadin/data/RpcDataProviderExtension.java
index 6b35ab7f88..c63864f79b 100644
--- a/server/src/com/vaadin/data/RpcDataProviderExtension.java
+++ b/server/src/com/vaadin/data/RpcDataProviderExtension.java
@@ -680,10 +680,15 @@ public class RpcDataProviderExtension extends AbstractExtension {
@Override
public void setPinned(String key, boolean isPinned) {
+ Object itemId = keyMapper.getItemId(key);
if (isPinned) {
- keyMapper.pin(keyMapper.getItemId(key));
+ // Row might already be pinned if it was selected from the
+ // server
+ if (!keyMapper.isPinned(itemId)) {
+ keyMapper.pin(itemId);
+ }
} else {
- keyMapper.unpin(keyMapper.getItemId(key));
+ keyMapper.unpin(itemId);
}
}
});