Vaadin interactions with ExternalResource

Hi,

Is there a possibility to send parameters from ExternalResource and get it into Vaadin aplication?
We have a web page for example http://www.nir.si/test.html as an ExternalResource.
1.On ExternalResource click on link “Click me” to send url parameters to URL browser.
2.Click button “Get Parameters” on vaadin application to get url parameters from the browser

But it doesn’t work. I don’t get any parameters from the browser. Is this feature supported in vaadin?

Here is example code:

html page test.html:

</head><body>
<a href="test.html?id=3qw54">Click me</a> 
</body></html>

and Vaadin aplication:

public class App extends Application {

    @Override
    public void init() {
        Window mainWindow = new Window("Test");
        URL url= null;
        try {
            url = new URL(this.getURL(), "http://www.nir.si/test.html");
        } catch (MalformedURLException ex) {
            System.out.println(ex.getMessage());
        }

        final ExternalResource er = new ExternalResource(url);
        final Embedded browser = new Embedded("", er);
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setHeight("460px");
        browser.setWidth("460px");
        browser.setImmediate(true);
        mainWindow.addComponent(browser);

        Button b = new Button("Get Parameters");
        b.addListener(new Button.ClickListener() {
            public void buttonClick(Button.ClickEvent event) {
                for (final Iterator i = browser.getParameterNames(); i.hasNext();) {
                    String name = (String) i.next();
                    String values = (String) browser.getParameter(name);
                    System.out.println(name + "=" + values);
                }
            }
        });
        mainWindow.addComponent(b);
        setMainWindow(mainWindow);
    }
}

Here is example how to post parameters from 3rd party page to vaadin application.
Here is sample code:

Vaadin application “receiveParameters”

public class App1 extends Application implements ParameterHandler {
    private TextArea ta;
    
    @Override
    public void init() {
        Window mainWindow = new Window("Test");
        URL url= null;
        try {
            url = new URL(this.getURL(), "http://www.nir.si/test1.html");
        } catch (MalformedURLException ex) {
            System.out.println(ex.getMessage());
        }

        ta = new TextArea("Received parameters:");
        mainWindow.addComponent(ta);
        final ExternalResource er = new ExternalResource(url);
        final Embedded browser = new Embedded("", er);
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setHeight("460px");
        browser.setWidth("460px");
        browser.setImmediate(true);
        mainWindow.addParameterHandler(this);
        mainWindow.addComponent(browser);

        setMainWindow(mainWindow);
    }

    public void handleParameters(Map<String, String[]> parameters) {
        String strParameters = "";
        for (final Iterator i = parameters.keySet().iterator(); i.hasNext();) {
            final String name = (String) i.next();
            final String[] values = (String[]
) parameters.get(name);
            String v = "";
            for (int j = 0; j < values.length; j++) {
                if (v.length() > 0) {
                    v += ", ";
                }
                v += "'" + values[j]
 + "'";
            }
            strParameters += " " + (name + "=" + v);
           
        }
        ta.setValue(strParameters);
    }
}

External resource on the server http://www.nir.si/test1.html

</head><body>
<a href="http://localhost:8080/receiveParameters?id=3qw54">Click me</a> 
</body></html>

href structure:
http://localhost:8080/receiveParameters” is local URL of vaadin application.
“id=3qw54” is parameter

But problem is because on the External resource link “Click me” open in Embedded browser layout.
How I can set to open link in main browser window?