Refresh Grid when not using a data provider?

56 views Asked by At

I have a Vaadin Grid that I am filling manually using setItems(). When I click on one of the items, I feed it to a FormLayout that is inside a Dialog for editing. I pass a reference to my Service class into the Dialog to save the Item when the edit is complete.

When the Dialog is closed, I want it to fire an event that will cause the grid to be refreshed, via a method in the grid's view class. When I have done this with Spring events, even passing the grid object, itself, as a reference into the Dialog and then back into the event, a different instance of the grid is being updated. I assume this is from the "every browser tab is its own view instance" concept of Vaadin.

So! How do I accomplish this? How do I get an event or a message from the dialog to cause the original grid to be refreshed?

Code structure for reference:

View
  Grid

Dialog
  Form
Selecting entry in the grid triggers a new Dialog(new Form(event.getItem)), then a dialog.open();
0

There are 0 answers