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

Table defaultTable = initDefaultTable(); //initTable initializes the schema
populateDefaultTable(); //Populates checkbox and two other columns

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

        defaultTable.addItem(new Object[] { 
                }, myObj.getId());


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

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.