Calling gwt static method from parent of iframe

Posted by Richard Wallis on Stack Overflow See other posts from Stack Overflow or by Richard Wallis
Published on 2011-01-13T09:08:21Z Indexed on 2011/01/14 3:53 UTC
Read the original article Hit count: 226

Filed under:
|
|

I'd like to know how to call a GWT static method from the parent of the iframe in which the gwt module is loaded.

As a simple example suppose I have the following gwt class:

public class Simple {
    public static void showWindow() {
        Window.alert("Hello from the iframe");
    }
}

I create an html host page called "iFrameHost.html" that can run the function above. Then in an unrelated GWT module on a different page I call:

Frame iFrame = new Frame("iFrameHost.html");
RootPanel.get().add(iFrame);

How do I now call the showWindow() method from the parent page?

© Stack Overflow or respective owner

Related posts about gwt

Related posts about methods