diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/ui/Table.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 55f3f27507..60b6122270 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -1479,9 +1479,10 @@ public class Table extends AbstractSelect implements Action.Container, // Collects the basic facts about the table page final int pagelen = getPageLength(); - int firstIndex = getCurrentPageFirstItemIndex(); int rows, totalRows; rows = totalRows = size(); + int firstIndex = Math + .min(getCurrentPageFirstItemIndex(), totalRows - 1); if (rows > 0 && firstIndex >= 0) { rows -= firstIndex; } |