tags:

views:

210

answers:

2

Hi,

I want to open one subwindow from another subwindow.That is, i m having one popup subwindow in that window i placed one button.If we click that button another popup subwindow should open. When i am trying this i m getting error that "java.lang.IllegalArgumentException: You can only add windows inside application-level windows." Can anyone tell me how to solve this in vaadin.

+3  A: 

You need a reference to the main window for the application and add a subwindow to that.

yourCurrentSubWindow.getApplication.getMainWindow().addWindow(myNewSubWindow);

Hope this helps.

Jonas G
+1  A: 

Just a small correction to the previous solution:

yourCurrentSubWindow.getApplication().getMainWindow().addWindow(myNewSubWindow);

Those div-bases embedded child windows cannot contain sub-windows, but the main window (and any other top level native window) can.

quickanalysis