How can I add a new row to a table and make it editable

What I wish is a bit more complicated than what the title suggests.

I have a table of items whose data source is a JPA container:

  • The table has a few generated columns not part of the jpa container(a few buttons)
  • All the data in the table is a label (except for the previously mentioned buttons)

I have a button below the table which is used to add new data.

What I want to happen is:

  • User clicks the button to add new data
  • Table adds a new empty row
  • The row and only that row is set as editable
  • The first item in the row is now a combobox instead of a label
  • The final two items are a “Finish” button and a “Cancel” button which are only visible while the row is editable and control if the row will be saved or rolled back
  • Selecting an item from the combobox fills the rest of the data in that row(the item in the combobox is of the same type as the items inside the JPA container this table was filled with)


I’m a newbie to Vaadin so first and foremost: Is something like that doable?
If it is doable how do I approach it?

Hi Matija,
maybe this example will help you