更新时间:2022-01-07 08:01:58
在方法addTab()
中,您可以添加
TabView tabView = new TabView();
Tab newTab = new Tab();
newTab.setTitle("Tab Title");
tabView.getChildren().add(newTab);
并且您应该更新视图以反映新选项卡.使用RequestContext
进行Ajax更新.
And you should update the view to reflect the new tab. Use RequestContext
for ajax update.
RequestContext context = RequestContext.getCurrentInstance();
context.update("tabview");