Vaadin-XS as a standard application

Hello, I’m using Vaadin 6.8.8 with Vaadin-XS for div-embedded application, but now I want too a iframe-embedded application. Notice that I want both embedded ways (div and iframe).

With Vaadin-XS it works perfectly with div-embedded and also with iframe-embedded. I can load my web application and work with it. The problem come with the url parameter handler, with div-embedded works perfectly but with iframe-embedded not.

The issue is that I can’t change any component on start, with iframe-embedded:

@Override
public void init() {
    VerticalLayout initLayout = new VerticalLayout();
    initLayout.addComponent(new Label("Hello World!"));

    mainWindow = new Window("Test app");
    mainWindow.setTheme("myTheme");

    mainWindow.addURIHandler(new URIHandler() {
        @Override
        public DownloadStream handleURI(URL context, String relativeUri) {				
            if(relativeUri != null && !relativeUri.isEmpty())
                test();

            return null;
        }
    });

    mainWindow.setContent(initLayout);
    setMainWindow(mainWindow);
}
private void test() {
    VerticalLayout layout = new VerticalLayout();
    layout.addComponent(new Label("Ola mundo!");

    mainWindow.setContent(layout);
}

With this snippets, when I pass any parameter throw URL (in a iframe), my application has to show “Ola mundo!” but it shows “Hello World!”. If I change the vaadin-xs servlet for the standard servlet, this snippets work perfectley.

What do I have to do to have div and iframe embedded application?