是否可以将一个Vaadin应用程序嵌套到另一个应用程序中?我想用应用程序A实现一个门户,并将几个应用程序嵌入到该门户中。

我可以通过使用不同的ID作为目标元素多次调用vaadin.initApplication来使多个Vaadin应用程序彼此相邻:

vaadin.initApplication("target-element-id",{
    "theme": "mytheme",
    "versionInfo": {
        "vaadinVersion": "7.5.1",
        "atmosphereVersion": "2.2.7.vaadin1"
    },
    "widgetset": "de.test.widgetset",
    "vaadinDir": "http://localhost/VAADIN/",
    "browserDetailsUrl": "http://localhost/service1",
    "serviceUrl": "http://localhost/service1",
    "debug": true,
    "standalone": false,
    "heartbeatInterval": 300
});


但是,一旦我将某个元素指定为Vaadin UI中已经存在的目标,就会出现以下错误:


  java.lang.AssertionError:具有现有父窗口小部件的窗口小部件可能不会添加到分离列表中

最佳答案

听起来好像您希望将Vaadin应用程序用作portlet。 Vaadin文档包含一章:https://vaadin.com/docs/-/part/framework/portal/portal-overview.html

有关Java Portlet的信息:
https://en.wikipedia.org/wiki/Java_Portlet_Specification

您可以看看Liferay:
https://en.wikipedia.org/wiki/Liferay

09-09 22:39
查看更多