Grid inline editor commit handler methods not fired [v7]

I’m trying the inline editor for the 1st time and I’m struggling with how to save the modified data.
I’ve found some scarce documentation here and there (the Grid page docs doesn’t state anything clear about it - and also has some typos, saying that you have to use a .setBuffered() method to enable/disable buffered mode, while in fact it’s .setEditorBuffered()) and finally I’ve determined that I have to add a commit handler to the editor field group this way:

myGrid.getEditorFieldGroup().addCommitHandler(new FieldGroup.CommitHandler(){
    @Override
    public void preCommit(FieldGroup.CommitEvent commitEvent) throws FieldGroup.CommitException {
    }

    @Override
    public void PostCommit(FieldGroup.CommitEvent commitEvent) throws FieldGroup.CommitException {
    }
});

The problem is that I’ve implemented both methods, placed breakpoints inside them and they never get called. So it seems the event is never fired.

This is crucial for me in order to be able to save the modified changes.

When looking for the error I haven’t found any references. Just this bug a guy filled time ago and it was closed due to being unrepliable:


https://github.com/vaadin/framework/issues/8299

The funny thing is that I tried to do the same as this guy and I got exactly the same behaviour. That is, I applied a value change listener to a column and the code never gets fired when changing it:

grid.getColumn("myColumn")
    .getEditorField()
    .addValueChangeListener(
        event -> Notification.show(event.getProperty().getValue().toString())
    );

My Grid is backed by a BeanItemContainer and the only “peculiar” thing is that I have filters in all of its columns.

Ok, I found what was happening. The source of my problem was that I was doing all this prior to assigning the datasource for my grid.

Thanks all and sorry for bothering :wink: