From: Matti Tahvonen Date: Wed, 7 Mar 2007 10:48:52 +0000 (+0000) Subject: table fix: check for empty table came too late X-Git-Tag: 6.7.0.beta1~6546 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6aab46cffd32d5c0cf733b9c05fad79a1cce40b2;p=vaadin-framework.git table fix: check for empty table came too late svn changeset:808/svn branch:trunk --- 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