]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merge of (#9133) to Vaadin 7. 29/629/1
authorAnna Koskinen <anna@vaadin.com>
Fri, 11 Jan 2013 12:05:46 +0000 (14:05 +0200)
committerAnna Koskinen <anna@vaadin.com>
Fri, 11 Jan 2013 12:05:46 +0000 (14:05 +0200)
Sort optimization.

Change-Id: I2b75de400acde7fe23574d6439b75e6f05b4eb55

server/src/com/vaadin/ui/Table.java

index 57f196d704630b1c87cf9c41ef316e96f3c8b1ff..e73c6d7188cfd78dc66d99bd7e9e3ea67ee8fbe0 100644 (file)
@@ -4427,9 +4427,12 @@ public class Table extends AbstractSelect implements Action.Container,
         final Container c = getContainerDataSource();
         if (c instanceof Container.Sortable) {
             final int pageIndex = getCurrentPageFirstItemIndex();
+            boolean refreshingPreviouslyEnabled = disableContentRefreshing();
             ((Container.Sortable) c).sort(propertyId, ascending);
             setCurrentPageFirstItemIndex(pageIndex);
-            refreshRowCache();
+            if (refreshingPreviouslyEnabled) {
+                enableContentRefreshing(true);
+            }
 
         } else if (c != null) {
             throw new UnsupportedOperationException(