Adding OptionGroup in table

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());

}

To do this kind of Stuff, you can use GeneratedColumns:
JavaDOC
.

I am not sure why I need to add GeneratedColumns. Why wouldn’t adding an optionGroup work?

This issue is still open. Can somebody help me figureout why the optiongroup is not working?

In your table.addItem Method you’re never adding an instance of an OptionGroup. OptionGroup.getItem(index) should return and Object with the value true or false but it certainly doesn’t return an OptionGroup. When you add the Item try also adding something like new OptionGroup() in the optiongroup column.

Still i think that Eduardo is also right as such things can be handled quite more easily with a Generated Column.