From 24b43d902c71ea469e2105f3a1c8be2f84610f04 Mon Sep 17 00:00:00 2001 From: Denis Anisimov Date: Mon, 19 Sep 2016 16:26:32 +0300 Subject: Data should be updated when it's set for disabled components. Fixes vaadin/framework8-issues#286 Change-Id: I0d6cf49addfd558d43671ad2953dee54529392cd --- .../java/com/vaadin/client/data/AbstractRemoteDataSource.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'client/src') diff --git a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java index 9dd1a504ab..4ca363ea3c 100644 --- a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java +++ b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java @@ -320,6 +320,7 @@ public abstract class AbstractRemoteDataSource implements DataSource { * @return true if waiting for data; otherwise * false */ + @Override public boolean isWaitingForData() { return currentRequestCallback != null; } @@ -462,7 +463,7 @@ public abstract class AbstractRemoteDataSource implements DataSource { currentRequestCallback = null; } - Range maxCacheRange = getMaxCacheRange(); + Range maxCacheRange = getMaxCacheRange(received); Range[] partition = received.partitionWith(maxCacheRange); @@ -698,9 +699,13 @@ public abstract class AbstractRemoteDataSource implements DataSource { } private Range getMaxCacheRange() { + return getMaxCacheRange(getRequestedAvailability()); + } + + private Range getMaxCacheRange(Range range) { Range availableDataRange = getAvailableRangeForCache(); - Range maxCacheRange = cacheStrategy.getMaxCacheRange( - requestedAvailability, cached, availableDataRange); + Range maxCacheRange = cacheStrategy.getMaxCacheRange(range, cached, + availableDataRange); assert maxCacheRange.isSubsetOf(availableDataRange); -- cgit v1.2.3