From 6aab46cffd32d5c0cf733b9c05fad79a1cce40b2 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Wed, 7 Mar 2007 10:48:52 +0000 Subject: [PATCH] table fix: check for empty table came too late svn changeset:808/svn branch:trunk --- src/com/itmill/toolkit/ui/Table.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java index 211fa8d3ea..c9cbcb8ba8 100644 --- a/src/com/itmill/toolkit/ui/Table.java +++ b/src/com/itmill/toolkit/ui/Table.java @@ -1561,6 +1561,10 @@ public class Table extends Select implements Action.Container, firstIndex = reqFirstRowToPaint; if (rows + firstIndex > size()) rows = size() - firstIndex; + Object[][] cells = new Object[cols + CELL_FIRSTCOL][rows]; + if (rows == 0) + return cells; + // Get first item id if (items instanceof Container.Indexed) id = ((Container.Indexed) items).getIdByIndex(firstIndex); @@ -1569,9 +1573,6 @@ public class Table extends Select implements Action.Container, for (int i=0; i