3

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?

jldupont
  • 93,734
  • 56
  • 203
  • 318

1 Answers1

8

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
    }
});
Andrei Volgin
  • 40,755
  • 6
  • 49
  • 58