Calling Method Between Multiple Windows

Hi Guys

I am new with Vaadin and I am trying to call a method from one window to another. I have gone through the various posts but can’t really see anything like what I want to do, so please forgive my ignorance. My situation is this:

I have a window opened within the main application that displays information in a table on that window. I need to add another row to that table and have built another window (as a modal window) for the user to fill out and submit. It is my hope that when the user clicks the save button on the second window, the focus will return to the first window and update the table. I have written a public method in the first window that will update the table, but how do I call it from the second window? I hope that makes sense.

Thank you!


You need to subclass (or wrap) the second window, and pass the first window object to the second window object. So in your first window you call Window secondWindow = new MySecondWindow(this); Should be straight forward from there.

Ahh, that makes it easy, thank you :smiley: