]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixed first visible to me more sane
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 12 Feb 2008 08:32:54 +0000 (08:32 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 12 Feb 2008 08:32:54 +0000 (08:32 +0000)
svn changeset:3773/svn branch:trunk

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

index 24fb59904d882f011ea89044fd293fd5f69594ee..63565f01b0ae75fcd96db72a2c7d5e721cd45a94 100644 (file)
@@ -977,12 +977,12 @@ public class Table extends AbstractSelect implements Action.Container,
     public void setCurrentPageFirstItemIndex(int newIndex) {
 
         // Ensures that the new value is valid
+        if (newIndex >= size()) {
+            newIndex = size() - pageLength;
+        }
         if (newIndex < 0) {
             newIndex = 0;
         }
-        if (newIndex >= size()) {
-            newIndex = size() - 1;
-        }
 
         // Refresh first item id
         if (items instanceof Container.Indexed) {