Passing data from table to form in subwindow and update table

I have very litlle time to finish my project and from week i struggle with passing data between table and form in subwindow.
I set data in table with


now when i double click on row i want subwindow come out with form with selected data in it, then i want modify data and update table when changes approved.
I can try pass selected data with

addListener(new ItemClickListener(){
	public void itemClick(ItemClickEvent event) {

to subwindow with

getWindow().addWindow(new ProducerSubwindow(event.getItem()));

and from subwindow to form, but then how can i update table when changes made changes?

Personaly i think binding data to components and passing and updating it between components in vaadin is pure nightmare and should been alot more documented :confused:

It should be quite easy. You should have a callback or you could just pass your application as a parameter to your subwindow.

getWindow().addWindow(new ProducerSubwindow( Application app, event.getItem()));

And in your ProducerSubwindow you have a method like

   app.update( obj);

I hope this is clear. You could check to see how you could implement a callback.