Refresh table from popup

Hi guys

hope you can help, i am new to vaadin.

I have a table which is built from a BeanContainer.
In order to enable a popup on a specific column, i created a popup object and added to each bean as a field, so when the table loads and the user clicks that specific cell a pop appears with file upload functionality.

On the popup I have a “Reject” button with a click listener. If the user clicks this button a call is made to update the database , then i call UI.getCurrent().requestRepaintAll(); which closes the popup and redraws the table component but as it was before. The reject item must be removed.

My issue is that the item row just rejected is still in the table, but I want it to reload that table contents fresh from the db, because i have many users on that table, once a user completes an action they need an updated table at that point in time. I have been reading around and have not seen how to do this.

Any help would be appreciated.

I think you have a method where you load your user records and set the beancontainer as data source of the table.

You simply call this Method again and the records are loaded fresh from the db and a new datasource is set which will lead to a refresh of the table.

Not quite sure if it works in your case but you could try using table.refreshrowcache() instead of requestRepaintAll() as repaint will just redraw the ui-representation while refreshrowcache should fetch new data. Although i’m not 100% sure if it’ll work for you.

Thanks guys

I think i found what i am looking for:

UI.getCurrent().getUI().getPage().open(“”, “Vaadin”);

I can put it in a clickListener.

So in my table, for each row click listener, do this and pass in parameters.

I scrapped that idea, i liked the Window object better.
the modal function on it is cool.