切换GateIn中的选项卡不会使Vaadin portlet的内容呈现。获取某些选项卡内容的唯一方法是选择选项卡并刷新页面。有没有办法解决这个问题? 以下是portlet的示例代码:
@Widgetset("ru.example.widgetset.ExampleWidgetset")
@SuppressWarnings("serial")
@Theme("reindeer")
public class Form1UI extends UI {
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = Form1UI.class)
public static class Servlet extends VaadinServlet {
}
@Override
protected void init(VaadinRequest request) {
final VerticalLayout layout = new VerticalLayout();
layout.setSizeFull();
setContent(layout);
Table table = new Table("The Brightest Stars");
table.addContainerProperty("Name", String.class, null);
table.addContainerProperty("Mag", Float.class, null);
Object newItemId = table.addItem();
Item row1 = table.getItem(newItemId);
row1.getItemProperty("Name").setValue("Sirius");
row1.getItemProperty("Mag").setValue(-1.46f);
table.addItem(new Object[]{"Canopus", -0.72f}, 2);
table.addItem(new Object[]{"Arcturus", -0.04f}, 3);
table.addItem(new Object[]{"Alpha Centauri", -0.01f}, 4);
layout.addComponent(table);
}
}