Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
CssImport when using Component Exporter by Mikhail Shabarov, 1 month ago
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
Last updated on May, 1st 2012
Sorry about that.Ya I was a bit lazy with reading :) 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
Last updated on May, 1st 2012
You cannot reply to this thread.