Edit inline Grid don't update my Pojo


I tried to use the Grid Component and i saw the feature of inline edit. It gives me 2 buttons in buffered mode (save and cancel).

The problem is, when i click on save, the value of the field is modified, but when i reload the page, this value come-back to it original value.

My grid has just 2 columns (bind to my Client pojo, wich have name and email attributes).

How can i update my data in database when i click save ? Do you have an example of that ? Thank’s

Best regards

By default “Save” updates value only in the container data source. If you want the value to be updated to database there are couple of options, but the classic way is as follows. Get FieldGroup with getEditorFieldGroup() method of the Grid. You can set your own commit handler to to field group, with addCommitHandler(…) method. By using these facilities you can set preffered validation and how to act e.g. if database commit is not succesful.