我手風琴有點問題。例如,當我嘗試刪除手風琴的一個選項卡時,我找不到任何方法來執行此操作。任何人都知道我可以做到這一點?如何動態刷新Vaadin手風琴?
這裏有一些我的代碼。
public ResponseUI(final Window mainWindow, boolean allowSave, final Context c) {
InjectHelper.inject(this);
buildMainLayout();
setCompositionRoot(mainLayout);
// TODO add user code here
//TODO: add responses to accordion
List<Templates> templatesReenvia = templateBusinessManager.getAllTemplatesResposta();
boolean bandera = true;
for(Templates tmpl : templatesReenvia) {
accordion_respostes.addTab(new PlantillaView(mainWindow, panel_1, c, tmpl), tmpl.getSubject());
}
panel_1.addComponent(new ResponseForm(mainWindow,allowSave));
panel_respostes.setScrollable(true);
button_1.addListener(new Button.ClickListener() {
public void buttonClick(ClickEvent event) {
final Window dialog = new Window("Edició de plantilla");
dialog.setModal(true);
mainWindow.addWindow(dialog);
dialog.addComponent(new PlantillaForm(mainWindow, c, false));
dialog.setWidth("85%");
}
});
}
在templateBusinessManager0
我有CRUD方法,所以我只需要知道如何在這種方法中的一個發生刷新我的手風琴。希望有人有更好的解決方案。
我需要刷新不刪除:/ – GooDFighTy 2014-09-04 15:10:28
刪除+添加=刷新,因爲它不是相同的對象 – 2014-09-04 16:58:24
@GooDFighTy還有replaceComponent。你的第一句話提到「刪除」,所以我認爲,這是你唯一的問題 – cfrick 2014-09-04 17:25:22