table.addContainerProperty("Column 1", String.class, "");
table.addContainerProperty("Column 2", Component.class, "");
table.addContainerProperty("Column 3", Component.class, "");
table.addContainerProperty("Column 4", Component.class, "");
Item item = table.addItem("Item 1 (row 1)");
item.getItemProperty("Column 1").setValue("String A");
item.getItemProperty("Column 2").setValue(new Label("Label A"));
item.getItemProperty("Column 3").setValue(
new Label("<b>Label A</b>", ContentMode.HTML));
VerticalLayout l = new VerticalLayout();
l.setId("row-1");
l.setHeight(100, Unit.PIXELS);
item.getItemProperty("Column 4").setValue(l);
item = table.addItem("Item 2 (row 2)");
item.getItemProperty("Column 1").setValue("String B");
item.getItemProperty("Column 2").setValue(new Label("Label B"));
item.getItemProperty("Column 3")
.setValue(
new Label(
"<a style=\"color: blue\" href=\"javascript:false\">Label B</a>",
ContentMode.HTML));
l = new VerticalLayout();
l.setId("row-2");
l.setSizeFull();
item.getItemProperty("Column 4").setValue(l);
Button clear = new Button("Clear");
clear.setId(CLEAR_BUTTON_ID);
clear.addClickListener(new ClickListener() {