What are considered best practices to pass data back from a Sub Window

Within my application I have a series of subwindows that collect data and pass them back to the original container. Currently, I am using the Guava EventBus to do this, but it seems like there should be a more fundamental way. I am curious, is there a more native way to accomplish this?

Register a listner with your Custom Sub window, once the user clicks on submit, call this Listener with the data/Bean, in the listener write your logic for populating the bean. Is this what you are looking at?

Ex -

public interface ContainerOps{ public void addDataToContainer(MyBean bean) { // My Logic to add the bean to the container } } in your window class

[code]
public class MySubWindow extends Window {

private ContainerOps ops;
//getter & Setters

public void submitClickListener(){
//Get Bean
ops.addDataToContainer(myBean);
}

}
[/code]Register the listener with your subWindow and it should work as expected.

Thanks,
Krishna.

Thanks, Krishna. That’s an interesting solution. I didn’t think about doing that. Much appreciated.