]> source.dussan.org Git - vaadin-framework.git/commitdiff
Trying to get everything roll with empty tables
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 9 Mar 2007 07:22:59 +0000 (07:22 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 9 Mar 2007 07:22:59 +0000 (07:22 +0000)
svn changeset:833/svn branch:trunk

src/com/itmill/toolkit/ui/Table.java

index 139a39c9b06f52df0d97e8847d8e06dd32b6333e..2f63d857263b1c6b38810319bf8349d8f4e0b234 100644 (file)
@@ -1559,10 +1559,14 @@ public class Table extends Select implements Action.Container,
         Object id;
         if (reqFirstRowToPaint >= 0 && reqFirstRowToPaint < size()) 
                firstIndex = reqFirstRowToPaint;
-        if (rows + firstIndex > size()) rows = size() - firstIndex;
+        if(size() > 0) {
+            if (rows + firstIndex > size()) rows = size() - firstIndex;
+        } else {
+               rows = 0;
+        }
 
         Object[][] cells = new Object[cols + CELL_FIRSTCOL][rows];
-        if (rows == 0 || size() == 0)
+        if (rows == 0)
             return cells;
 
         // Get first item id