SQL Container and removing records

i’m quite new to Vaadin so I have done a form following the tutorial in the addon component docs, but in the example is missing the delete record part, so I managed to write it myself:

else if( source == delete)
            Item id = getItemDataSource();

This is run when I click the delete button, this part of code is in the UserForm class.

I have not exceptions and the Item is correct…

Thank you in advance

You need to pass the item id to the removeItem method and not the Item instance. See
this thread
for an example.