我是 Vaadin 的新手。如何将表格组件传递到 Vaadin 7 中的新弹出屏幕?假设我已经使用 com.vaadin.ui.Table 创建了表。
表 aaa = 新表();
目前 Vaadin 教程只展示了如何在不传递组件/数据的情况下创建打印弹出窗口。基于以下代码
public static class PrintUI extends UI {
@Override
protected void init(VaadinRequest request) {
// Have some content to print
setContent(new Label(
"<h1>Here's some dynamic content</h1>\n" +
"<p>This is to be printed.</p>",
ContentMode.HTML));
// Print automatically when the window opens
JavaScript.getCurrent().execute(
"setTimeout(function() {" +
" print(); self.close();}, 0);");
}
}
...
// Create an opener extension
BrowserWindowOpener opener =
new BrowserWindowOpener(PrintUI.class);
opener.setFeatures("height=200,width=400,resizable");
// A button to open the printer-friendly page.
Button print = new Button("Click to Print");
opener.extend(print);
如果有人能告诉我如何将 Table aaa 传递给 PrintUI 类,我将不胜感激。