Table rows height set much too small

Hi guys,

I’m just dealing with a very very basic example of Vaadin but it’s just not working: I wanna display some items in a table, without bean container and stuff like this, just 20 items in a table…but the row height is set much too small and I can not see any item. I can see it does “something” as there is a number of rows in the table but I cant see any contents.

Can you help me please?

private VerticalSplitPanel buildVerticalSplitPanel_1()
// common part: create layout
verticalSplitPanel_1 = new VerticalSplitPanel();

	// table_1
	table_1 = new Table();
	// populate table
	table_1.addContainerProperty("ID",       Integer.class, null);
	table_1.addContainerProperty("First Name", String.class,  null);
	table_1.addContainerProperty("Last Name",  String.class,  null);
	for (int i=0; i<10; i++)
		table_1.addItem(new Object[] {new Integer(i),"FirstName_"+i,"LastName_"+i});
	return verticalSplitPanel_1;

Thanx in advance, Florian

The problem is probably here:

table_1.addItem(new Object[] {new Integer(i),"FirstName_"+i,"LastName_"+i})

The one-parameter addItem(Object) takes an item ID as a parameter, which is probably not what you intended. The special addItem(Object,Object) conveniency method in Table takes a property value array
an item ID. The index value works nicely as an item ID, so you should just add “i” parameter in the call:

table_1.addItem(new Object[] {new Integer(i),"FirstName_"+i,"LastName_"+i}, i)

whao, you just saved my day! Works perfectly…