I am trying a create a table with three columns. FIrst column has checkboxes and second column is some info. Third column some other info. But I am not seeing any checkboxes in UI.
OptionGroup defaultCheckboxGrp = new OptionGroup();
defaultCheckboxGrp.setMultiSelect(true);
Table defaultTable = initDefaultTable(); //initTable initializes the schema
populateDefaultTable(); //Populates checkbox and two other columns
addComponent(defaultTable);
private Table initDefaultTable() {
contextTable.addContainerProperty(“checkboxGrp”, OptionGroup.class, null);
contextTable.addContainerProperty(“Some text”, String.class, null);
contextTable.setColumnHeaders(new String {“Select”, “Some Text”});
}
public void populateDefaultTable() {
defaultCheckboxGrp.addItem(myObj.getId());
defaultTable.addItem(new Object[] {
defaultCheckboxGrp.getItem(0),
myObj.getText()
}, myObj.getId());
}