]> source.dussan.org Git - vaadin-framework.git/commitdiff
changed row indexes to start from 0 instead of 1 (normal C-style)
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Jun 2007 05:56:37 +0000 (05:56 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Jun 2007 05:56:37 +0000 (05:56 +0000)
svn changeset:1769/svn branch:trunk

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

index d90f6da39084ca846a277c6e4583ffd8916fcdb4..aefe4336c32f3d9eb61e9251a18110af72a0eb58 100644 (file)
@@ -1291,7 +1291,7 @@ public class Table extends Select implements Action.Container,
                if (variables.containsKey("firstvisible")) {
                        Integer value = (Integer) variables.get("firstvisible");
                        if (value != null)
-                               setCurrentPageFirstItemIndex(value.intValue() - 1);
+                               setCurrentPageFirstItemIndex(value.intValue());
                }
 
                // Sets requested firstrow and rows for the next paint
@@ -1299,7 +1299,7 @@ public class Table extends Select implements Action.Container,
                                || variables.containsKey("reqrows")) {
                        Integer value = (Integer) variables.get("reqfirstrow");
                        if (value != null)
-                               reqFirstRowToPaint = value.intValue() - 1;
+                               reqFirstRowToPaint = value.intValue();
                        value = (Integer) variables.get("reqrows");
                        if (value != null)
                                reqRowsToPaint = value.intValue();
@@ -1434,7 +1434,7 @@ public class Table extends Select implements Action.Container,
                target.addAttribute("cols", cols);
                target.addAttribute("rows", cells[0].length);
                target.addAttribute("firstrow",
-                               (reqFirstRowToPaint >= 0 ? reqFirstRowToPaint : first) + 1);
+                               (reqFirstRowToPaint >= 0 ? reqFirstRowToPaint : first) );
                target.addAttribute("totalrows", total);
                if (pagelen != 0)
                        target.addAttribute("pagelength", pagelen);