The code fragment you pasted will all reside in the same frame. Because it
is all part of the same module, there is nothing mysterious about it -
(other than the fact that GWT will minify and obfuscate the generated js
code).

Your earlier question was about two different GWT Modules (one on the
regular page, the other in an iframe in a dialog box) able to communicate
with each other through JSNI. Someone will likely give you a solution to the
problem you described., *but*....

... Why complicate your architecture to include multiple modules that depend
on each other via native JSNI method, which is also detrimental to client
side performance and usability in general?

You could just put your logic in the same module and invoke it when the
DialogBox opens. If you are concerned about loading the code unnecessarily,
you can try out code-splitting.

That's just my opinion. Someone else may have an answer to your specific
problem.

--Sri


On 7 April 2010 15:38, Blessed Geek <blessedg...@gmail.com> wrote:

> Certainly this is a trivial matter but for all the efforts put in to
> write a fairly comprehensible JSNI explanation in the GWT docs, I am
> unable to find any clarification on how the DOM is mapped by GWT.
>
> Because, when I do the following (instance of user using a static
> reference to Main to call refresh() ) it works:
>
> [code file="Main.java"]
> public class Main
>        implements EntryPoint
> {
>  static public Main mainref;
>  public void onModuleLoad() {
>    mainref = this;
>
>   .... yada ....
>
>   public void refresh(){
>    .... yada ....
>   }
> }
> [/code]
>
> [code file="User.java"]
>   .... yada ....
>  AsyncCallback<Hello> helloCallback = new AsyncCallback<Hello>{
>    .... yada ....
>    Main.refresh(); // this works.
>  }
> [/code]
>
> Since a static reference works, certainly GWT through some
> mysteriously way I have yet to comprehend is able to get across frames
> to get to refresh(). And so could I, if I had not used GWT but coded
> in pure javascript as I would have control and possess full
> consciousness of the frame structure of my app.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to