Re: preview in case of iframe

2012-07-02 Thread gpike
  The document inside you iFrame is a completely separate document and can 
be from a different domain as well so won't get any events just like you 
don't get events from other browser tabs. However you could communicate 
across the boundary by defining your own api's. What I mean is you can add 
Javascript methods to the containing document and call them from the child 
using top.insert method name. 

  What I've done in the past is create 2 entry points (and 
modules), essentially two GWT apps,  one for the parent window and the 
other for the child window. Using JSNI expose a well know method name on 
the parent that can be called. It can be a pain but we had an app that 
could be hosted in another app using a iFrame and could have hot key 
support for both passing key events to the parent. By the way this only 
works when both apps are from the same domain.

Good Luck,
 
Gordon Pike

On Sunday, July 1, 2012 1:45:07 AM UTC-6, bhomass wrote:

 I have been struggling with this for the whole day and can't crack the 
 nut. 

 I know how things work when you call 
 Event.addNativePreviewHandler(handler) to trigger event preview. The 
 preview is meant to be a global concept so that anything events 
 happening else where would get previewed. However, if an iframe is 
 added into the picture, the previewer is apparently not so global. 
 things happening inside the iframe does not trigger DOM.preview(evt), 
 and therefore does not get previewed. 

 I suppose this makes sense, that the iframe has an independent DOM 
 structure from the parent. Does any one know of a way to bridge the 
 two so that the two parts together still behaves truly in a GLOBAL 
 way?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/YbsOYD8DLoQJ.
To post to this group, send email to google-web-toolkit@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.



Re: preview in case of iframe

2012-07-02 Thread bhomass
thanks, I figured as much. The two documents are independent DOM structures 
and while the preview is global, it is only global within one DOM 
structure.

I got what I want w/o preview, using *addDomHandler. 

**as long as you have the handle to components in both frames, this works 
quite fine.*
*
*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/cTnkUh9OZYwJ.
To post to this group, send email to google-web-toolkit@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.