我想用 Vaadin 打开一个带有简单链接的子窗口。但 Link 唯一接受的是 URL,而不是 Window-Object。有没有办法让下面的代码工作?
VerticalLayout ToDoList = new VerticalLayout();
ToDoList.setSpacing(true);
ToDoList.setMargin(true);
ToDoList.setSizeFull();
ToDoList.setSizeUndefined();
// ...
Window mywindow = new Window("My Dialog");
mywindow.setPositionX(200);
mywindow.setPositionY(100);
ToDoList.addComponent(ToDoTable);
Link link = new Link("Click Me!", new ExternalResource(mywindow));
ToDoList.addComponent(link);