diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2007-06-20 05:56:37 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2007-06-20 05:56:37 +0000 |
commit | ad0916dc271f326f4125aafc990c8fe4ba828fbf (patch) | |
tree | c817ecc03b9f152fea0a6000289591629f9a6821 | |
parent | ea15bacee1ff61429b0185f64eb08e6243d47f7f (diff) | |
download | vaadin-framework-ad0916dc271f326f4125aafc990c8fe4ba828fbf.tar.gz vaadin-framework-ad0916dc271f326f4125aafc990c8fe4ba828fbf.zip |
changed row indexes to start from 0 instead of 1 (normal C-style)
svn changeset:1769/svn branch:trunk
-rw-r--r-- | src/com/itmill/toolkit/ui/Table.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java index d90f6da390..aefe4336c3 100644 --- a/src/com/itmill/toolkit/ui/Table.java +++ b/src/com/itmill/toolkit/ui/Table.java @@ -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); |