]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7908 added comments, don't call onScroll(null) if page length is zero and not a...
authorHenri Sara <henri.sara@itmill.com>
Mon, 21 Nov 2011 14:20:17 +0000 (14:20 +0000)
committerHenri Sara <henri.sara@itmill.com>
Mon, 21 Nov 2011 14:20:17 +0000 (14:20 +0000)
svn changeset:22086/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java

index 2e9dfd616461b23e50d7d0b490cb4a1cc2be7627..c10e3e11a4c76fe300430f65f15b9b2dd5f23675 100644 (file)
@@ -96,19 +96,21 @@ public class VTreeTable extends VScrollTable {
             if (scrollPosition != scrollPosition2) {
                 widget.setScrollPosition(scrollPosition);
             }
+
+            // check which rows are needed from the server and initiate a
+            // deferred fetch
+            onScroll(null);
         }
+        // Recalculate table size if collapse request, or if page length is zero
+        // (not sent by server) and row count changes (#7908).
         if (collapseRequest
                 || (!uidl.hasAttribute("pagelength") && getTotalRows() != oldTotalRows)) {
             /*
+             * Ensure that possibly removed/added scrollbars are considered.
              * Triggers row calculations, removes cached rows etc. Basically
              * cleans up state. Be careful if touching this, you will break
              * pageLength=0 if you remove this.
              */
-            onScroll(null);
-
-            /*
-             * Ensure that possibly removed/added scrollbars are considered.
-             */
             triggerLazyColumnAdjustment(true);
 
             collapseRequest = false;