Then, the next question that begs to be answered is,
Is maintaining a static reference a good practice for inter-frame
communication?

If I used only one browser session, I invoked Main entrypoint on two
separate Firefox tabs,
will both instances of Main be contending to write to "static public
Main mainref"?

Or does a static variable in GWT is actually a global to all frames
within the same root frame of an instance of Main.

I am also thinking of maintaining a HashMap<Interger, Main> appHash,
so that onModuleLoad of any Main instance

int thisKey = this.hashCode();
Main.appHash.put(thisKey, this);

And then when instance of Main pops up an instance of User, Main would
pass its value of thisKey to User as part of the URL.
Then, instance of User could draw out its corresponding instance of
Main

Main mymain = Main.appHash.get(thiskey);
mymain.refresh();

Would maintaining appHash be a good idea? Or would maintaining a
static reference be sufficient since static variables do not leak into
another instance of Main (or do they?) ?

Please advice:
- the DOM mapping of frames by GWT
- the behaviour of static variables in a GWT module.

-- 
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