How to refresh accordion dinamiclly

Hi everyone!

I’m having a little problem with accordion, when I try for example delete one tab of accordion I don’t find any way to do…
Anyone know how I can do this?
I let here some of my code.

public ResponseUI(final Window mainWindow, boolean allowSave, final Context c) {

    // 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));
    button_1.addListener(new Button.ClickListener() {
        public void buttonClick(ClickEvent event) {    
            final Window dialog = new Window("Edició de plantilla");
            dialog.addComponent(new PlantillaForm(mainWindow, c, false));

[/code]In templateBusinessManager0 I have CRUD methods, so I only need to know how to refresh my accordion when one of this methods occurs.
Hope someone have the better solution.
Thanks for advice!

It should work both with removeComponent(tabContentComponent) and removeTab(tabObject), where the Tab object is the one returned by addTab() and the different getTab() methods. If it doesn’t work with the latest stable Vaadin version (currently 7.3.0), please
create a ticket
with a minimal UI class to demonstrate the problem and a description of what happens (exceptions? nothing happens on removeTab()/removeComponent()?).

Thanks for quick answer Henri,
The problem that I have is that methods for CRUD that i mean are inside the accordion creating new window, etc…
So I need to take current tab to execute the methods that you mean before, maybe should sent by parameter to new window the accordion?

Thanks for advice.