以编程方式在cuba app中打开外部链接

时间:2017-10-12 09:00:12

标签: vaadin cuba-platform

我想通过点击按钮打开外部链接。我在按钮的操作方法中有以下代码:

((com.vaadin.ui.Button) myCubaButton.unwrap(com.vaadin.ui.Button)).UI.page.open('https://www.google.de', '_blank')

是否有更古巴的方式打开外部链接?

1 个答案:

答案 0 :(得分:1)

您可以使用AbstractWindow / WindowManager的showWebPage()方法:

showWebPage("https://google.com", ParamsMap.of("target", "_blank"));