Table/VerticalLayout, space at bottom, same height as visible rows

Hello,

maybe it is an error or i coding it wrong.

My goal is to create a simple scrollable table with a non-scrolling header.
For example 65 data rows and only 6 of them are visible.

The example code is at the bottom of this posting.

My problem is, that the VerticalLayout and/or the table are behaving strange with their heights.
I have an empty space after the bottom of the table, that has the same height as the visible table rows.

When i reduce the height of the layout, the amount of visible table rows shrinks also.

Maybe someone can help?

With kind regards


public class TestLayout extends CssLayout implements View {
	
	/* FOR ADDRESS TABLE COLUMN PROPERTIES */
	final String ADDRESS_CHECKBOX_STD_FIELD_ID  = new String("checkboxStdFieldId");
	final String ADDRESS_CHECKBOX_FIELD_ID      = new String("checkboxFieldId");
	final String ADDRESS_STREET_FIELD_ID        = new String("streetFieldId");
	final String ADDRESS_ZIPCODE_FIELD_ID       = new String("zipcodeFieldId");
	final String ADDRESS_CITY_FIELD_ID          = new String("cityFieldId");
	final String ADDRESS_COUNTRY_FIELD_ID       = new String("countryFieldId");

	public TestLayout() {
		
		Table addressTable = new Table();
		
		// setting properties + header
		addressTable.addContainerProperty(ADDRESS_CHECKBOX_STD_FIELD_ID, CheckBox.class, false);
		addressTable.setColumnHeader("test01");
		addressTable.addContainerProperty(ADDRESS_CHECKBOX_FIELD_ID, CheckBox.class, false);
		addressTable.setColumnHeader("test02");
		addressTable.addContainerProperty(ADDRESS_STREET_FIELD_ID, String.class, null);
		addressTable.setColumnHeader("test03");
		addressTable.addContainerProperty(ADDRESS_ZIPCODE_FIELD_ID, String.class, null);
		addressTable.setColumnHeader("test04");
		addressTable.addContainerProperty(ADDRESS_CITY_FIELD_ID, String.class, null);
		addressTable.setColumnHeader("test05");
		addressTable.addContainerProperty(ADDRESS_COUNTRY_FIELD_ID, String.class, null);
		addressTable.setColumnHeader("test06");
		addressTable.setColumnWidth(ADDRESS_COUNTRY_FIELD_ID, 65);
		
		addressTable.setPageLength(6);		
				
		VerticalLayout vLayout = new VerticalLayout();
		vLayout.setHeight(200, Sizeable.Unit.PIXELS);
		
		vLayout.addComponent(addressTable);
		
		this.addComponent(vLayout);
		
		// LIST OF 64 objects
		List<Address> addressesList 
			= currentUI.getSetupController().getAddresses("123");
			
		// LIST OF 64 objects added to table
		for (Address address : addressesList) {
			
			CheckBox stdAddressBox = new CheckBox();
			
			CheckBox normAddressBox = new CheckBox();
			
			addressTable.addItem(new Object[] { 
					stdAddressBox,
					normAddressBox, 
					address.getStreet(), 
					address.getZip(), 
					address.getCity(), 
					address.getCountry()}, 
					address);
		}
	}
}

Here (link at bottom) is mentioned to test with a additional GET-Parameter to
see the application using the standard theme:

e.g. http://localhost:8080/?theme=reindeer

In that case the table is correctly rendered. So now i will look for incorrect theme entries…

Link: http://stackoverflow.com/questions/9310076/vaadin-table-keeps-showing-scrollbars?rq=1