BrowserWindowOpener关闭事件

时间:2014-07-23 11:36:28

标签: java vaadin vaadin7

我有这样的代码

printWindow = new BrowserWindowOpener(invoicesBeanService.getHTMLStream());     printWindow.setFeatures("menubar=no,location=no,toolbar=no,resizable=no,scrollbars=yes,status=no,width=900");
printWindow.extend(this.button_2);

关闭弹出窗口时,如何检测BrowserWindowOpener的关闭事件?

1 个答案:

答案 0 :(得分:0)

将按键侦听器添加到按钮

Button button_2 = new Button("Close");
button_2.addClickListener(new ClickListener() {
    private static final long serialVersionUID = 1L;
    public void buttonClick(ClickEvent event) {
        close();
    }
});
printWindow.extend(button_2);
layout.addComponent(button_2);