Problem with layouts in generated colum

Hello,

I have problem with components (mostly labels) set into layout, which are placed into generated column of table.

Code below setup two tables, first one works properly, while second has height calculation problem.

Note: Both tables has minor height calculation issue, which can be solved by setting label css properties to:

padding-top: 0px;
padding-bottom: 0px;

First table works properly because its first column is regular (not generated).
Second one has height calculation issue because it only has generated columns, and one of its columns has
layout which width has been set to 100% width (has to be set to get components aligned).
Second table would work like first, if layout in last column would not have setWidth(“100%”).

public class Application extends com.itmill.toolkit.Application{

	public void init() {
		try{
		    Window main = new Window("Generated column / Layout test");
	        setMainWindow(main);

	        VerticalLayout baseLayout = new VerticalLayout();
	        baseLayout.setWidth("100%");
	        baseLayout.setSpacing(true);


	        Table table1 = initTable(10, false);
	        baseLayout.addComponent(new Label("Table with one regular field instart of table and two generated fields."));
	        baseLayout.addComponent(table1);

	        Table table2 = initTable(10, true);
	        baseLayout.addComponent(new Label("Table with oly generated fields."));
	        baseLayout.addComponent(table2);

	        main.setLayout(baseLayout);

		}catch(Exception e){
			e.printStackTrace();
		}
    }

	private Table initTable(int pageLength, boolean firstColumnIsGenerated){
		Table table = new Table();
		table.setWidth("100%");
		table.setPageLength(pageLength);

		table.setContainerDataSource(createDemoData(pageLength));

		if(!firstColumnIsGenerated){
			table.setColumnHeader("firstname", "FirstName");
		}else{
			table.addGeneratedColumn("firstname", new LayoutColumnGenerator(new String[]{"firstname"}));
		}
		table.addGeneratedColumn("lastname", new LayoutColumnGenerator(new String[]{"lastname"}));
		table.addGeneratedColumn("whole name", new LayoutColumnGenerator(new String[]{"firstname", "lastname"}));

		return table;
	}

	private Container createDemoData(int pageLength){
		List<Data> dataList = new ArrayList<Data>();
		for(int i=0; i<pageLength; i++){
			dataList.add(new Data("Firstname"+i, "Lastname"+i));
		}
		BeanArrayContainer bac = new BeanArrayContainer(dataList);
		return bac;
	}
	
	public class Data {
		private String firstname;
		private String lastname;
		public Data(String firstname, String lastname) {
			super();
			this.firstname = firstname;
			this.lastname = lastname;
		}
		public String getFirstname() {
			return firstname;
		}
		public String getLastname() {
			return lastname;
		}
	}

	public class LayoutColumnGenerator implements ColumnGenerator {

		private String[] fields;
		public LayoutColumnGenerator(String[] fields){
			this.fields = fields;
		}

		public Component generateCell(Table source, Object itemId, Object columnId) {
			Item item = source.getItem(itemId);
			HorizontalLayout layout = new HorizontalLayout();
			
			for(String field : fields){
				String fieldData = (String)item.getItemProperty(field).getValue();
				Label fieldLabel = new Label(fieldData);
				layout.addComponent(fieldLabel);
				fieldLabel.setSizeUndefined();
				if(fields.length > 1){
					layout.setComponentAlignment(fieldLabel, Alignment.TOP_CENTER);
					layout.setWidth("100%");
				}
			}
			return layout; 
		}
	}
}

This issue was fixed 3 weeks ago (http://dev.itmill.com/ticket/2691) but it seems it’s not in any official builds.
Artur or Magi, what is the schedule for 5.3.1?

We are currently finalizing 5.3.1 and it is scheduled to be released next week.