Question

I started using the CellTable widget. I need an editable text cell so I tried TextInputCell but to my dismay, I can't find the "value change handler".

How can I get notified when the cell content changes?

Was it helpful?

Solution

You don't need change handlers for cells. You set a FieldUpdater on your column. It has update() method which fires when value of a cell in this column changes. For example:

myEditableColumn.setFieldUpdater(new FieldUpdater<T, String>() {
    @Override
    public void update(int index, T object, String value) {
        // do something when value changes
    }
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top