Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open new subwindow from another subwindow in vaadin?

Tags:

vaadin

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.

like image 752
Kumar Avatar asked Mar 10 '10 05:03

Kumar


1 Answers

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.

like image 164
Jonas Granvik Avatar answered Oct 10 '22 02:10

Jonas Granvik