From: Matti Tahvonen Date: Thu, 5 Jun 2008 11:45:50 +0000 (+0000) Subject: fixes #1771 X-Git-Tag: 6.7.0.beta1~4659 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bf4b4fe1b589af100c183c81c5eecaffdf5c48d7;p=vaadin-framework.git fixes #1771 svn changeset:4752/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java index 16d14171d8..10ad2238dc 100644 --- a/src/com/itmill/toolkit/ui/Table.java +++ b/src/com/itmill/toolkit/ui/Table.java @@ -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;