Bug in table when adding cells?

Hi, I was trying to add cells to a Vaadin Table as the following code snippet

        Table table = new Table();
        for (int i = 1; i < 10; i++) {
            Integer col1 = new Integer(i);
            String col2 = "uri"+col1;
            Object[] cells = new Object[]
 {col1,col2};
            table.addItem(cells , cells.hashCode() );
            table.commit();
        }
        Iterator<?> it = table.getItemIds().iterator();
        while(it.hasNext()) {
            System.out.println(it.next());
        }

but the table seems empty. Do I miss anything or is there maybe a bug?

Cheers,
Toby

The table does not know what to display. I think.
U read the
book
?

Sorry about that.Ya I was a bit lazy with reading :slight_smile: Of course I should set the meta data of the table first e.g.


        table.addContainerProperty("Number", Integer.class,  null);
        table.addContainerProperty("String", String.class,  null);

Thanks,
Toby