Vaadin 7.0.0.beta5 Window replaceComponent

I`m using 7.0.0.beta5 . replaceComponent in window don´t works.

I´m tried replaceComponent(oldComponent, newComponent) and ((VerticalLayout)getContent()).replaceComponent(oldComponent, newComponent) .

Using 7.0.0 beta1 works fine.

can someone help me?

Thanks.

Seems to work nicely for me with the latest version in the git repository (which should be quite close to beta5).

Have you verified that your code that invokes replaceComponent is actually run?

You could also check whether the new component is sent to the client-side by checking the output in the debug console (opened when ?debug is in the URL as long as production mode is not enabled).

This is the code that works for me:

public class ReplaceWindowComponent extends UI {
    private Window window = new Window();
    private Label oldComponent = new Label("Old component");
    private Label newComponent = new Label("New component");

    @Override
    protected void init(VaadinRequest request) {
        window.addComponent(oldComponent);

        addWindow(window);

        window.addComponent(new Button("Replace window content",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        window.replaceComponent(oldComponent, newComponent);
                    }
                }));
    }
}

Thanks, your examples work´s fine.

I do not know what the problem was, but beta 6 solved it.