Table - fire event upon change data of a cell...

Hi all,

I have a Table where it contains a
CheckBox
as shown in the attached image & I’m in the process of firing an event upon changing the value of the
CheckBox

I tried the following example given in the book.


// Shows feedback from selection.
final Label current = new Label("Selected: -");

// Handle selection change.
table.addListener(new Property.ValueChangeListener() {
    public void valueChange(ValueChangeEvent event) {
        current.setValue("Selected: " + table.getValue());
    }
});

And this is a row selection event.

I need to fire an event when the check box is selected/deselected.
How can I achieve this…?

Any help is greatly appreciated.

Thanks in advance.
Asela.
11397.png

if you need to attach a handler to clicking the checkbox then use cb.addListener(Button.ClickListener) and don’t forget to set cb.setImmediate(true).

Cheers