]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #1771
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 5 Jun 2008 11:45:50 +0000 (11:45 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 5 Jun 2008 11:45:50 +0000 (11:45 +0000)
svn changeset:4752/svn branch:trunk

src/com/itmill/toolkit/ui/Table.java

index 16d14171d81165b2164b478aae6a37e736cffbb2..10ad2238dcf2775e35f78db3ca2d4ed0cd17b649 100644 (file)
@@ -1148,7 +1148,8 @@ public class Table extends AbstractSelect implements Action.Container,
             final int cols = colids.length;
             final int pagelen = getPageLength();
             int firstIndex = getCurrentPageFirstItemIndex();
-            int rows = size();
+            int rows, totalRows;
+            rows = totalRows = size();
             if (rows > 0 && firstIndex >= 0) {
                 rows -= firstIndex;
             }
@@ -1162,18 +1163,18 @@ public class Table extends AbstractSelect implements Action.Container,
             }
             Object id;
             if (firstToBeRenderedInClient >= 0) {
-                if (firstToBeRenderedInClient < size()) {
+                if (firstToBeRenderedInClient < totalRows) {
                     firstIndex = firstToBeRenderedInClient;
                 } else {
-                    firstIndex = size() - 1;
+                    firstIndex = totalRows - 1;
                 }
             } else {
                 // initial load
                 firstToBeRenderedInClient = firstIndex;
             }
-            if (size() > 0) {
-                if (rows + firstIndex > size()) {
-                    rows = size() - firstIndex;
+            if (totalRows > 0) {
+                if (rows + firstIndex > totalRows) {
+                    rows = totalRows - firstIndex;
                 }
             } else {
                 rows = 0;