Update and reveal row in table


I try to achieve the following:

  • A table shows all available orders
  • A detail pane allows to edit the details of a selected order

If the user has finished editing an order and saves his work, I would like to

  1. update the data of the edited order in the table
  2. and make sure that the edited order is visible in the table (the user may have scrolled the table during editing the order)

To solve the first problem, it seems necessary to use components in the table as it is otherwise not possible to update just a single row (http://dev.vaadin.com/ticket/3171) - is this correct?

Regarding the second problem, I have no idea how to solve it. The Table offers the method getVisibleItemIds(), but I did not found any setter method.

Any help appreciated,

No, you can certainly update a single row, just update the properties of the item. Table will redraw all rows, though, that’s what the ticket is about, but this is usually not a problem.

In your case it sounds like you want to do: when the user selects a row, get the selected item and put that in a Form that is not writeTrough. When the user clicks ‘save’, call form.commit() → the table should automatically be updated.
Of course you can do it manually as well, something like

Use one of these:


Best Regards,