1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package com.vaadin.tests.themes.valo;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.v7.ui.Table;
public class TableWithEmptyCaption extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
Table table = new Table();
table.addContainerProperty("first", String.class, "");
table.addContainerProperty("last", String.class, "");
table.addContainerProperty("actions", Component.class, null);
table.addItem(new Object[] { "Teemu", "Test", new Button("Edit") }, 1);
table.addItem(new Object[] { "Dummy", "Test", new Button("Edit") }, 2);
table.setPageLength(0);
table.setColumnHeaders("First Name", "Last Name", "");
table.setFooterVisible(true);
table.setColumnFooter("first", "Footer");
table.setColumnFooter("last", "");
table.setColumnFooter("actions", "");
addComponent(table);
}
@Override
protected String getTestDescription() {
return "Test that column headers (and footers) work properly with empty captions.";
}
@Override
protected Integer getTicketNumber() {
return 14812;
}
}
|