如何从 vaadin 中的另一个子窗口打开新的子窗口?
我想从另一个子窗口打开一个子窗口。也就是说,我在该窗口中有一个弹出子窗口,我放置了一个按钮。如果我们单击该按钮,则应该打开另一个弹出子窗口。当我尝试此操作时,我收到错误“java.lang.IllegalArgumentException:您只能在应用程序级窗口中添加窗口。”谁能告诉我如何在 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要引用应用程序的主窗口,并向其添加一个子窗口。
希望这有帮助。
You need a reference to the main window for the application and add a subwindow to that.
Hope this helps.
只是对先前解决方案的一个小修正:
那些基于 div 的嵌入式子窗口不能包含子窗口,但主窗口(以及任何其他顶级本机窗口)可以。
Just a small correction to the previous solution:
Those div-bases embedded child windows cannot contain sub-windows, but the main window (and any other top level native window) can.
在 Vaadin 7 上,可以按如下方式完成此操作:
On Vaadin 7 this can be done as follows: