开发者

How to open new subwindow from another subwindow in 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 ho开发者_JAVA技巧w to solve this in vaadin.


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.


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.


On Vaadin 7 this can be done as follows:

getUI().addWindow(myNewSubWindow);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜