Re: Iframe = multithreading ???

2017-09-14 Thread Paul Porombka
And one more thing, UI thread is only one for windowed / process 
application. So the clicks and generally Browser can be blocked when you 
will use time consuming operation on UI. If you will use e.g. setTimeout, 
no clicking etc, then it could work much better. Because this single UI 
thread must be "shared" by renderer of all frames / windows / documents 
visible to the user :-)

On Thursday, September 14, 2017 at 2:26:30 PM UTC+2, Paul Porombka wrote:
>
> YES, totally agree. This is probably because Web Workers don't use any UI 
> there. So they are probably better scheduled and "lighter", so works much 
> better than forcing multithreading with IFrames :-)
> But the concept is pretty nice, don't you think :-)
>
> And to clarify. I was rather also considering a situation where I have a 
> blank page in IFrame, without any UI elements, probably hidden frame, that 
> will handle heavy operations, sent there from parent using postMessage. 
> Because user interactions on UI can cause the behavior you observed. Then I 
> would be closer to Web Workers. But definitely Web Workers are the right 
> way in such situations. 
>
> PS: Did you try your test using Web Workers for comparison?
>
>
> On Thursday, September 14, 2017 at 1:21:48 PM UTC+2, Thomas Broyer wrote:
>>
>>
>>
>> On Thursday, September 14, 2017 at 12:09:37 PM UTC+2, Paul Porombka wrote:
>>>
>>> Hi Ben,
>>>
>>> I see the time when you've posted the message and see the answers here, 
>>> so I codn;t stop to write something here.
>>> I will answer YES to your question, but it depends.
>>>
>>> Generally, IFrame under the same domain is using the same thread. I 
>>> don't know how it was at the time You've been asking, but now if you use 
>>> IFrame with different origin (domain/host) it will use its own context, own 
>>> event loop, so also ot will be separate thread.
>>>
>>
>> It's actually a bit more complicated: 
>> https://html.spec.whatwg.org/multipage/webappapis.html#event-loops
>> While browsers are *allowed* to use different event loops for those 
>> "units of related similar-origin browsing contexts", it adds complications 
>> (see note in spec)
>> A quick test in my Chrome 61 on Linux shows that the same event loop is 
>> used for the iframe and parent browsing contexts loaded from totally 
>> different origins (I do heavy DOM manipulations in the iframe on the click 
>> of a button, and use a tight setTimeout loop on the parent that updates an 
>> element; when I click on the button in the iframe, I clearly see the parent 
>> "pause"; there are no communication by any mean between the pages; using 
>> 127.0.0.1.xip.io and devd.io to have distinct origins for the same local 
>> server).
>> Same in Firefox 55.
>>
>> So while it theorically *can* happen (is allowed by spec), it's not the 
>> case in practice.
>>
>> Web Workers are the only (guaranteed, effective) way of "multithreading" 
>> in the browser. 
>>  
>>
>>> Currently a Web Workers concept is using this behavior. The problem was 
>>> always with communication between those two frames, so it was also solved 
>>> by "Messages". You are able to post a message to different ORIGIN and 
>>> addEventListener to "message" event to receive such messages, and voila! 
>>> You have two way communication between threads :-)
>>>
>>> So if you create a code that can be executed separately in different 
>>> IFrame, and exeute it in different ORIGIN, then YES you will get REAL 
>>> multithreading, not single event loop, real muti-event-loop :-)
>>>
>>> On Thursday, September 3, 2009 at 12:51:09 AM UTC+2, ben fenster wrote:
>>>>
>>>> i was wondering that if by opening another module in an iframe tag the 
>>>> code of that module runs in another thread ?? 
>>>> more over is the limit of 2 open http request apply on 2 diffrent 
>>>> modules running in diffrent iframes ??
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Iframe = multithreading ???

2017-09-14 Thread Paul Porombka
YES, totally agree. This is probably because Web Workers don't use any UI 
there. So they are probably better scheduled and "lighter", so works much 
better than forcing multithreading with IFrames :-)
But the concept is pretty nice, don't you think :-)

And to clarify. I was rather also considering a situation where I have a 
blank page in IFrame, without any UI elements, probably hidden frame, that 
will handle heavy operations, sent there from parent using postMessage. 
Because user interactions on UI can cause the behavior you observed. Then I 
would be closer to Web Workers. But definitely Web Workers are the right 
way in such situations. 

PS: Did you try your test using Web Workers for comparison?


On Thursday, September 14, 2017 at 1:21:48 PM UTC+2, Thomas Broyer wrote:
>
>
>
> On Thursday, September 14, 2017 at 12:09:37 PM UTC+2, Paul Porombka wrote:
>>
>> Hi Ben,
>>
>> I see the time when you've posted the message and see the answers here, 
>> so I codn;t stop to write something here.
>> I will answer YES to your question, but it depends.
>>
>> Generally, IFrame under the same domain is using the same thread. I don't 
>> know how it was at the time You've been asking, but now if you use IFrame 
>> with different origin (domain/host) it will use its own context, own event 
>> loop, so also ot will be separate thread.
>>
>
> It's actually a bit more complicated: 
> https://html.spec.whatwg.org/multipage/webappapis.html#event-loops
> While browsers are *allowed* to use different event loops for those "units 
> of related similar-origin browsing contexts", it adds complications (see 
> note in spec)
> A quick test in my Chrome 61 on Linux shows that the same event loop is 
> used for the iframe and parent browsing contexts loaded from totally 
> different origins (I do heavy DOM manipulations in the iframe on the click 
> of a button, and use a tight setTimeout loop on the parent that updates an 
> element; when I click on the button in the iframe, I clearly see the parent 
> "pause"; there are no communication by any mean between the pages; using 
> 127.0.0.1.xip.io and devd.io to have distinct origins for the same local 
> server).
> Same in Firefox 55.
>
> So while it theorically *can* happen (is allowed by spec), it's not the 
> case in practice.
>
> Web Workers are the only (guaranteed, effective) way of "multithreading" 
> in the browser. 
>  
>
>> Currently a Web Workers concept is using this behavior. The problem was 
>> always with communication between those two frames, so it was also solved 
>> by "Messages". You are able to post a message to different ORIGIN and 
>> addEventListener to "message" event to receive such messages, and voila! 
>> You have two way communication between threads :-)
>>
>> So if you create a code that can be executed separately in different 
>> IFrame, and exeute it in different ORIGIN, then YES you will get REAL 
>> multithreading, not single event loop, real muti-event-loop :-)
>>
>> On Thursday, September 3, 2009 at 12:51:09 AM UTC+2, ben fenster wrote:
>>>
>>> i was wondering that if by opening another module in an iframe tag the 
>>> code of that module runs in another thread ?? 
>>> more over is the limit of 2 open http request apply on 2 diffrent 
>>> modules running in diffrent iframes ??
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Iframe = multithreading ???

2017-09-14 Thread Thomas Broyer


On Thursday, September 14, 2017 at 12:09:37 PM UTC+2, Paul Porombka wrote:
>
> Hi Ben,
>
> I see the time when you've posted the message and see the answers here, so 
> I codn;t stop to write something here.
> I will answer YES to your question, but it depends.
>
> Generally, IFrame under the same domain is using the same thread. I don't 
> know how it was at the time You've been asking, but now if you use IFrame 
> with different origin (domain/host) it will use its own context, own event 
> loop, so also ot will be separate thread.
>

It's actually a bit more 
complicated: https://html.spec.whatwg.org/multipage/webappapis.html#event-loops
While browsers are *allowed* to use different event loops for those "units 
of related similar-origin browsing contexts", it adds complications (see 
note in spec)
A quick test in my Chrome 61 on Linux shows that the same event loop is 
used for the iframe and parent browsing contexts loaded from totally 
different origins (I do heavy DOM manipulations in the iframe on the click 
of a button, and use a tight setTimeout loop on the parent that updates an 
element; when I click on the button in the iframe, I clearly see the parent 
"pause"; there are no communication by any mean between the pages; using 
127.0.0.1.xip.io and devd.io to have distinct origins for the same local 
server).
Same in Firefox 55.

So while it theorically *can* happen (is allowed by spec), it's not the 
case in practice.

Web Workers are the only (guaranteed, effective) way of "multithreading" in 
the browser. 
 

> Currently a Web Workers concept is using this behavior. The problem was 
> always with communication between those two frames, so it was also solved 
> by "Messages". You are able to post a message to different ORIGIN and 
> addEventListener to "message" event to receive such messages, and voila! 
> You have two way communication between threads :-)
>
> So if you create a code that can be executed separately in different 
> IFrame, and exeute it in different ORIGIN, then YES you will get REAL 
> multithreading, not single event loop, real muti-event-loop :-)
>
> On Thursday, September 3, 2009 at 12:51:09 AM UTC+2, ben fenster wrote:
>>
>> i was wondering that if by opening another module in an iframe tag the 
>> code of that module runs in another thread ?? 
>> more over is the limit of 2 open http request apply on 2 diffrent 
>> modules running in diffrent iframes ??
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Iframe = multithreading ???

2017-09-14 Thread Paul Porombka
Hi Ben,

I see the time when you've posted the message and see the answers here, so 
I codn;t stop to write something here.
I will answer YES to your question, but it depends.

Generally, IFrame under the same domain is using the same thread. I don't 
know how it was at the time You've been asking, but now if you use IFrame 
with different origin (domain/host) it will use its own context, own event 
loop, so also ot will be separate thread.

Currently a Web Workers concept is using this behavior. The problem was 
always with communication between those two frames, so it was also solved 
by "Messages". You are able to post a message to different ORIGIN and 
addEventListener to "message" event to receive such messages, and voila! 
You have two way communication between threads :-)

So if you create a code that can be executed separately in different 
IFrame, and exeute it in different ORIGIN, then YES you will get REAL 
multithreading, not single event loop, real muti-event-loop :-)

On Thursday, September 3, 2009 at 12:51:09 AM UTC+2, ben fenster wrote:
>
> i was wondering that if by opening another module in an iframe tag the 
> code of that module runs in another thread ?? 
> more over is the limit of 2 open http request apply on 2 diffrent 
> modules running in diffrent iframes ??

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to add a GWT module to a dynamically created Iframe

2017-05-31 Thread Gourav Dhelaria
What's the best way to handle this scenario ?
- Code wise have I would like to have 2 seperate GWT modules. Modules as 
defined in this page 
<http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html>
- Download both modules in a single download, as a js file.
- Run one of the modules in a dynamically created iframe.




Detailed description:

I have a GWT module called 'embed' which generates embed.nocache.js file.
I have another GWT module called 'widget' which generates widget.nocache.js 
file.

I add embed.nocache.js to my HTML page. This adds a link called 'widget' in 
the HTML page.
On click of this link, an iframe (say, widget.html) opens. widget.html has 
a link to widget.nocache.js. This file gets downloaded, gets executed in 
the iframe and puts a horizontal panel into the iframe.


Now I need to eliminate a seperate download of widget.nocache.js file.

Say I inherit 'widget' module in embed, it gets compiled and downloaded 
together. How do I initialise the all the 'widget' related javascript in a 
dynamically created iframe ?  



Can creating a custom linker help ?



Thanks.







-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to Load html files through iframe

2016-01-11 Thread N Troncoso
Frame iframe = new Frame();
iframe.setUrl("path/to/file");

On Monday, December 28, 2015 at 10:23:01 AM UTC-5, Chandan Kumar Rout wrote:
>
> Hi  all.
> I want to load a html file which is in location file:///C:/test.html. 
> How i can load it in my GWT application. Is it possible or not.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: CSS Resources are not set in Panels in an iframe

2016-01-08 Thread confile
I could extend the CrossSiteIframeLinker and change: 

L413:   out.print("var $wnd = $wnd || window.parent;"); 

to 

 out.print("var $wnd = $wnd ||  document.getElementById("myiframe");");


But what do you mean by "an iframe created during "bootstrap"? Where do I 
create the iframe?




Am Dienstag, 5. Januar 2016 18:40:28 UTC+1 schrieb Thomas Broyer:
>
> Ideally, probably use a custom linker that makes it so that $wnd and $doc 
> point to an iframe created during "bootstrap" of the app.
> Or as I said before, don't use widgets.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/2bf5cdc5-9108-45ac-911b-44995474f518%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: CSS Resources are not set in Panels in an iframe

2016-01-08 Thread Colin Alworth
As long as both $wnd and $doc exist in the frame where you plan on
creating/rendering widgets, it shouldn't matter how you create or find the
iframe. This should only mean that your frame must be created when that
line of bootstrap code executes, either because you created it there, or
because you found it.

On Fri, Jan 8, 2016 at 11:44 AM confile <michael.gorsk...@googlemail.com>
wrote:

> I could extend the CrossSiteIframeLinker and change:
>
> L413:   out.print("var $wnd = $wnd || window.parent;");
>
> to
>
>  out.print("var $wnd = $wnd ||  document.getElementById("myiframe");");
>
>
> But what do you mean by "an iframe created during "bootstrap"? Where do I
> create the iframe?
>
>
>
>
> Am Dienstag, 5. Januar 2016 18:40:28 UTC+1 schrieb Thomas Broyer:
>
>> Ideally, probably use a custom linker that makes it so that $wnd and $doc
>> point to an iframe created during "bootstrap" of the app.
>> Or as I said before, don't use widgets.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Contributors" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-web-toolkit-contributors/2bf5cdc5-9108-45ac-911b-44995474f518%40googlegroups.com
> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/2bf5cdc5-9108-45ac-911b-44995474f518%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CADcXZMyKHytCTrSe4_30crX%2BkMvGNCRczDV9winitokb0OVKWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: CSS Resources are not set in Panels in an iframe

2016-01-08 Thread confile
@Colin, I did not get your point how would you generate a GWT app inside: 


   
 // GWT app
  



Am Freitag, 8. Januar 2016 20:28:50 UTC+1 schrieb Colin Alworth:
>
> As long as both $wnd and $doc exist in the frame where you plan on 
> creating/rendering widgets, it shouldn't matter how you create or find the 
> iframe. This should only mean that your frame must be created when that 
> line of bootstrap code executes, either because you created it there, or 
> because you found it.
>
> On Fri, Jan 8, 2016 at 11:44 AM confile <michael@googlemail.com 
> > wrote:
>
>> I could extend the CrossSiteIframeLinker and change: 
>>
>> L413:   out.print("var $wnd = $wnd || window.parent;"); 
>>
>> to 
>>
>>  out.print("var $wnd = $wnd ||  document.getElementById("myiframe");");
>>
>>
>> But what do you mean by "an iframe created during "bootstrap"? Where do 
>> I create the iframe?
>>
>>
>>
>>
>> Am Dienstag, 5. Januar 2016 18:40:28 UTC+1 schrieb Thomas Broyer:
>>
>>> Ideally, probably use a custom linker that makes it so that $wnd and 
>>> $doc point to an iframe created during "bootstrap" of the app.
>>> Or as I said before, don't use widgets.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Contributors" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-web-toolkit-contributors+unsubscr...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/2bf5cdc5-9108-45ac-911b-44995474f518%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/2bf5cdc5-9108-45ac-911b-44995474f518%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/97684df6-7149-4068-841d-a2108991ce8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Link GWT code into an iframe

2016-01-08 Thread confile
I want to link the code produced by GWT into an iframe like described here: 

https://perishablepress.com/embed-external-content-via-iframe-and-div/




 http://www.google.com/; width="377" height="377" marginwidth="0" 
marginheight="0" frameborder="no" scrolling="yes" style="border-width:2px; 
border-color:#333; background:#FFF; border-style:solid;">
 






*How can I do that with GWT?*

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: CSS Resources are not set in Panels in an iframe

2016-01-08 Thread confile
Here is what I want to do with 
GWT. https://perishablepress.com/embed-external-content-via-iframe-and-div/

Any idea how to do that?


Am Dienstag, 5. Januar 2016 18:40:28 UTC+1 schrieb Thomas Broyer:
>
> Ideally, probably use a custom linker that makes it so that $wnd and $doc 
> point to an iframe created during "bootstrap" of the app.
> Or as I said before, don't use widgets.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/554286ee-f7cf-450f-bd6f-7e44b3065a1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: CSS Resources are not set in Panels in an iframe

2016-01-05 Thread Thomas Broyer


On Monday, January 4, 2016 at 8:31:56 PM UTC+1, confile wrote:
>
> I want to insert GWT Widgets like FlowPanel, HTMLPanel inside and iframe 
> using GWT.
>

TL;DR: you can't.

 

> I find out how to insert GWT Widgets and Panels programmatically into GWT. 
> Here is how I do it:
>
>
>   public interface Resources extends ClientBundle {
>
> @Source({Css.DEFAULT_CSS})
> Css css();
>
>   }
>
>   public interface Css extends CssResource {
>
> String DEFAULT_CSS = "test/client/app/start/StartView.gss";
>
> String outerBox();
> String iframe();
> String test();
>
>   }
>
>   @UiField(provided = true)
>   Resources resources;
>
>   @UiField(provided = true)
>   Messages messages;
>
>   @Inject
>   public StartView(final Binder binder, Resources resources, Messages 
> messages)
>   {
> this.resources = resources;
> resources.css().ensureInjected();
> this.messages = messages;
> initWidget(binder.createAndBindUi(this));
>
> final IFrameElement iframe = Document.get().createIFrameElement();
> FlowPanel innerBox = new FlowPanel() {
>@Override
>protected void onLoad() {
>  super.onLoad();
>
>  FlowPanel p1 = new FlowPanel();
>  p1.addStyleName(resources.css().test());
>
>  HTMLPanel panel = new HTMLPanel("Hello World!");
>  panel.setStyleName(resources.css().test());  // does not work
>  p1.add(panel);
>
>  final Document doc = iframe.getContentDocument();
>  BodyElement body = doc.getBody();
>
>  body.appendChild(p1.getElement());
>
>
When doing this, you're neutralizing event handling on the widgets, making 
many of them unusable.

What you need to do is either:

   - load a GWT app into the iframe and communicate with it to make it 
   build the UI you're expecting
   - or only "inject" elements into the frame, not widgets.

But one has to wonder why you want to use an iframe to begin with…

 

>
>  panel.setStyleName(resources.css().test());  // does not work
>  p1.getElement().addClassName(resources.css().test()); // does not 
> work
>
>}
> };
>   }
>
> The former code inserts GWT Panels into an iframe. The problem is that I 
> cannot set any css style. Even if I set the style with:
>
> panel.setStyleName(resources.css().test());  // does not work
> p1.getElement().addClassName(resources.css().test()); // does not work
>
> both variants do not work. I know I can inject a general css file in the 
> head of the iframe document, but I want to use the GWT resources.
>
> *How can I set the styles using CSS/GSS Resources for the Panels inside 
> the iframe?*
>
As Grzegorz Nowak said, you need to inject your stylesheet into the iframe 
first; it's as easy as creating a 

[gwt-contrib] Re: CSS Resources are not set in Panels in an iframe

2016-01-05 Thread Grzegorz Nowak
According to this 
<https://github.com/gwtproject/gwt/blob/master/user/src/com/google/gwt/resources/client/CssResource.java#L311>
 'ensureInjected' 
uses StyleInjector.injectStylesheet(String) to inject the text of the style 
into head of $doc. You would have to manually inject it (Use 
CssResource.getText()) into your iframe's head to be able to use it. 
Unfortunately StyleInjector does not permit to specify the document to 
which the style should be injected in similar manner ScriptInjector does, 
so you will have to implement it yourself based on both ScriptInjector and 
StyleInjector. After successful injection you can assign styles to elements 
from Css/Gss resources.

On Monday, January 4, 2016 at 8:31:56 PM UTC+1, confile wrote:
>
> I want to insert GWT Widgets like FlowPanel, HTMLPanel inside and iframe 
> using GWT. I find out how to insert GWT Widgets and Panels 
> programmatically into GWT. Here is how I do it:
>
>
>   public interface Resources extends ClientBundle {
>
> @Source({Css.DEFAULT_CSS})
> Css css();
>
>   }
>
>   public interface Css extends CssResource {
>
> String DEFAULT_CSS = "test/client/app/start/StartView.gss";
>
> String outerBox();
> String iframe();
> String test();
>
>   }
>
>   @UiField(provided = true)
>   Resources resources;
>
>   @UiField(provided = true)
>   Messages messages;
>
>   @Inject
>   public StartView(final Binder binder, Resources resources, Messages 
> messages)
>   {
> this.resources = resources;
> resources.css().ensureInjected();
> this.messages = messages;
> initWidget(binder.createAndBindUi(this));
>
> final IFrameElement iframe = Document.get().createIFrameElement();
> FlowPanel innerBox = new FlowPanel() {
>@Override
>protected void onLoad() {
>  super.onLoad();
>
>  FlowPanel p1 = new FlowPanel();
>  p1.addStyleName(resources.css().test());
>
>  HTMLPanel panel = new HTMLPanel("Hello World!");
>  panel.setStyleName(resources.css().test());  // does not work
>  p1.add(panel);
>
>  final Document doc = iframe.getContentDocument();
>  BodyElement body = doc.getBody();
>
>  body.appendChild(p1.getElement());
>  panel.setStyleName(resources.css().test());  // does not work
>  p1.getElement().addClassName(resources.css().test()); // does not 
> work
>
>}
> };
>   }
>
> The former code inserts GWT Panels into an iframe. The problem is that I 
> cannot set any css style. Even if I set the style with:
>
> panel.setStyleName(resources.css().test());  // does not work
> p1.getElement().addClassName(resources.css().test()); // does not work
>
> both variants do not work. I know I can inject a general css file in the 
> head of the iframe document, but I want to use the GWT resources.
>
> *How can I set the styles using CSS/GSS Resources for the Panels inside 
> the iframe?*
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/bcac2700-9a1d-41e5-9cfb-5ea4c89dfe94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: CSS Resources are not set in Panels in an iframe

2016-01-05 Thread confile
Do you have an example for a custom linker?

Am Dienstag, 5. Januar 2016 18:40:28 UTC+1 schrieb Thomas Broyer:
>
> Ideally, probably use a custom linker that makes it so that $wnd and $doc 
> point to an iframe created during "bootstrap" of the app.
> Or as I said before, don't use widgets.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/caaf41c2-35ef-4941-ba22-2ab366a80a49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: CSS Resources are not set in Panels in an iframe

2016-01-05 Thread Thomas Broyer
Ideally, probably use a custom linker that makes it so that $wnd and $doc point 
to an iframe created during "bootstrap" of the app.
Or as I said before, don't use widgets.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/519f9070-9431-49b4-bef8-7f4f9246a426%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: CSS Resources are not set in Panels in an iframe

2016-01-05 Thread confile
Hi Thomas, 

the reason why I want to use an iframe is the following. I want to create a 
JavaScript widget which is integrated into another third party page. Have a 
look at this: https://www.livechatinc.com/ They have a chat widget which 
has the following structure: 


  
   // widget content
  


I guess they use the iframe such that the page containing the widget does 
not change the css or html tree of the widget. 

Do you see how such a technique can be used with GWT?


 

Am Dienstag, 5. Januar 2016 10:16:39 UTC+1 schrieb Thomas Broyer:
>
>
>
> On Monday, January 4, 2016 at 8:31:56 PM UTC+1, confile wrote:
>>
>> I want to insert GWT Widgets like FlowPanel, HTMLPanel inside and iframe 
>> using GWT.
>>
>
> TL;DR: you can't.
>
>  
>
>> I find out how to insert GWT Widgets and Panels programmatically into 
>> GWT. Here is how I do it:
>>
>>
>>   public interface Resources extends ClientBundle {
>>
>> @Source({Css.DEFAULT_CSS})
>> Css css();
>>
>>   }
>>
>>   public interface Css extends CssResource {
>>
>> String DEFAULT_CSS = "test/client/app/start/StartView.gss";
>>
>> String outerBox();
>> String iframe();
>> String test();
>>
>>   }
>>
>>   @UiField(provided = true)
>>   Resources resources;
>>
>>   @UiField(provided = true)
>>   Messages messages;
>>
>>   @Inject
>>   public StartView(final Binder binder, Resources resources, Messages 
>> messages)
>>   {
>> this.resources = resources;
>> resources.css().ensureInjected();
>> this.messages = messages;
>> initWidget(binder.createAndBindUi(this));
>>
>> final IFrameElement iframe = Document.get().createIFrameElement();
>> FlowPanel innerBox = new FlowPanel() {
>>@Override
>>protected void onLoad() {
>>  super.onLoad();
>>
>>  FlowPanel p1 = new FlowPanel();
>>  p1.addStyleName(resources.css().test());
>>
>>  HTMLPanel panel = new HTMLPanel("Hello World!");
>>  panel.setStyleName(resources.css().test());  // does not work
>>  p1.add(panel);
>>
>>  final Document doc = iframe.getContentDocument();
>>  BodyElement body = doc.getBody();
>>
>>  body.appendChild(p1.getElement());
>>
>>
> When doing this, you're neutralizing event handling on the widgets, making 
> many of them unusable.
>
> What you need to do is either:
>
>- load a GWT app into the iframe and communicate with it to make it 
>build the UI you're expecting
>- or only "inject" elements into the frame, not widgets.
>
> But one has to wonder why you want to use an iframe to begin with…
>
>  
>
>>
>>  panel.setStyleName(resources.css().test());  // does not work
>>  p1.getElement().addClassName(resources.css().test()); // does not 
>> work
>>
>>}
>> };
>>   }
>>
>> The former code inserts GWT Panels into an iframe. The problem is that I 
>> cannot set any css style. Even if I set the style with:
>>
>> panel.setStyleName(resources.css().test());  // does not work
>> p1.getElement().addClassName(resources.css().test()); // does not work
>>
>> both variants do not work. I know I can inject a general css file in the 
>> head of the iframe document, but I want to use the GWT resources.
>>
>> *How can I set the styles using CSS/GSS Resources for the Panels inside 
>> the iframe?*
>>
> As Grzegorz Nowak said, you need to inject your stylesheet into the iframe 
> first; it's as easy as creating a 

[gwt-contrib] CSS Resources are not set in Panels in an iframe

2016-01-04 Thread confile
I want to insert GWT Widgets like FlowPanel, HTMLPanel inside and iframe 
using GWT. I find out how to insert GWT Widgets and Panels programmatically 
into GWT. Here is how I do it:


  public interface Resources extends ClientBundle {

@Source({Css.DEFAULT_CSS})
Css css();

  }

  public interface Css extends CssResource {

String DEFAULT_CSS = "test/client/app/start/StartView.gss";

String outerBox();
    String iframe();
String test();

  }

  @UiField(provided = true)
  Resources resources;

  @UiField(provided = true)
  Messages messages;

  @Inject
  public StartView(final Binder binder, Resources resources, Messages messages) 
   
  {
this.resources = resources;
resources.css().ensureInjected();
this.messages = messages;
initWidget(binder.createAndBindUi(this));

final IFrameElement iframe = Document.get().createIFrameElement();
FlowPanel innerBox = new FlowPanel() {
   @Override
   protected void onLoad() {
 super.onLoad();

 FlowPanel p1 = new FlowPanel();
 p1.addStyleName(resources.css().test());

 HTMLPanel panel = new HTMLPanel("Hello World!");
 panel.setStyleName(resources.css().test());  // does not work
 p1.add(panel);

 final Document doc = iframe.getContentDocument();
 BodyElement body = doc.getBody();

 body.appendChild(p1.getElement());
 panel.setStyleName(resources.css().test());  // does not work
 p1.getElement().addClassName(resources.css().test()); // does not work

   }
};
  }

The former code inserts GWT Panels into an iframe. The problem is that I 
cannot set any css style. Even if I set the style with:

panel.setStyleName(resources.css().test());  // does not work
p1.getElement().addClassName(resources.css().test()); // does not work

both variants do not work. I know I can inject a general css file in the 
head of the iframe document, but I want to use the GWT resources.

*How can I set the styles using CSS/GSS Resources for the Panels inside the 
iframe?*

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/3a12b6b5-b339-4380-abbb-23ccd5ee7934%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to Load html files through iframe

2015-12-28 Thread Chandan Kumar Rout
Hi  all.
I want to load a html file which is in location file:///C:/test.html. 
How i can load it in my GWT application. Is it possible or not.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Cross Site Iframe Linker and Script Tags

2015-09-24 Thread Greg
Hi

I know it's an old thread but I used few hours to quickly implement a 
linker and special entry point class that uses script tags from gwt.xml 
files and injects them automatically using ScriptInjector. There are few 
changes required in EntryPoint classes but they are not that intrusive.

Could you tell me if such approach is sensible? Do you see any problems it 
could cause (except difference in performance - scripts have to be loaded 
one after another instead of almost concurrently).

Link to repo: https://github.com/metteo/gwt-si

Greg

On Monday, November 12, 2012 at 5:54:57 PM UTC+1, Thomas Broyer wrote:
>
>
>
> On Monday, November 12, 2012 4:55:58 PM UTC+1, googelybear wrote:
>>
>> I have the same error when running the code server and this limitation 
>> effectively prevents me from using superdevmode, as in my case the problem 
>> is with an external library that I include which then uses the 

What happens if compiled script (iframe content) is loaded after outer page is parsed

2014-12-28 Thread Jose María Zaragoza

Hello:

Reading the GWT Bootstrap on Googles page

http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideBootstrap

I wonder what happens if host page is parsed before iframe's contents are 
loaded. 
Does it wait for it ? Does it do anything ?

I know onInjectionDone() function is called when outer page is parsed ( by 
script defer  ) . And it calls maybeStartModule() , but i don't see if 
onInjectionDone() performs some kind of checking 


Thanks and regards

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


iFrame usage any shortcomings that we should we aware of ?

2014-12-03 Thread sch
Hi!

We are using iframe to render document content fetched from the server. 
The document on the server could have been created using Word as authoring 
tool / created via an HTML editor on the client itself. The content on the 
server is stored in individual items on the server. We need to fetch a 
certain number of such items in one go and then scroll and fetch more 
content. Since the content can have it's own formatting we have used the 
iframe so that the application's styling does not interfere with the 
document content.

Going forward we want to introduce following feature-

We are displaying the items in a HTML panel as cell widgets. We want to be 
able to scroll to the specific content when we select a cell widget and if 
we select content then we should highlight the corresponding item. In order 
to achieve this we are thinking of using the GWT cell widget to show 
content also. Does this sound OK ? are there any limitations on the iframe 
which makes this kind of selection difficult ?




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Cross Site Iframe Linker and Script Tags

2014-11-06 Thread Etienne Lacazedieu
Well, it was a Code Splitting problem.

Both SuperDevMode and DevMode works fine with the new linker.





Le mercredi 5 novembre 2014 23:21:22 UTC+1, Etienne Lacazedieu a écrit :

 Hi,

 I'm preparing a big switch (GWT2.3 to 2.6.1, which may change to 2.7.0 
 depening on the final release date), and I'm having trouble with the 
 xsiframe linker.. I have no problems with adding script tags in the HTML 
 file.

 Actually, I wrote a linker (a subclass of CrossSiteIframeLinker), which 
 outputs the list of JS files to a properties file.

 On the server side, a class reads this file to add script tags (we use 
 JSP).

 My problem is that we have a rather complex integration process, with 
 several GWT applications on the same page.


- a Container app, which creates Desktop-like UI, and exposes some JS 
native API to interact with other apps.
- several Functional apps, each one containing one or more functional 
modules. Each functional module description is injected to the 
 container 
app, which creates a launcher command. Invoking the command (done in the 
container app) triggers the creation of the functional module UI (done in 
the functional app). When this function returns, the container grabs the 
new DOM element and creates a Window UI around it.


 My problem with the XSI linker is that I cannot get it to work as it did 
 before.. 

 In my sample deployment, the container is called SampleGWTContainer, and 
 the functional app is called SampleApplication.

 I have the following error in the console : 

 $wnd.SampleApplication.runAsyncCallback2 is not a function

 The odd thing is that when I start SuperDevMode, and recompile 
 SampleApplication, it works.
 If I recompile SampleGWTContainer, I have the same error.

 I still have to try to remove the split point, to make know if it is a 
 Linker or a Code Splitting related problem..

 Any idea that might help me out? 

 Thanks a lot,

 Etienne

 Le mercredi 16 juillet 2014 11:28:33 UTC+2, Thomas Broyer a écrit :



 On Wednesday, July 16, 2014 11:06:43 AM UTC+2, gabriele.prandini wrote:

 This problem is blocking me from use superdevmode
 i have many 3th library, also gwt-ext... and gwt-ext have some script 
 tag on his gwt.xml
 so sad :-(


 As the error message says: add set-configuration-property 
 name='xsiframe.failIfScriptTag' value='FALSE'/ to your gwt.xml and put all 
 the needed script tags in your HTML host page (or inject them using 
 ScriptInjector from your onModuleLoad, deferring everything else until 
 after the scripts have been loaded)
  


 Il giorno lunedì 12 novembre 2012 17:54:58 UTC+1, Thomas Broyer ha 
 scritto:



 On Monday, November 12, 2012 4:55:58 PM UTC+1, googelybear wrote:

 I have the same error when running the code server and this limitation 
 effectively prevents me from using superdevmode, as in my case the 
 problem 
 is with an external library that I include which then uses the script 
 tag 
 in its own module xml.
 Also not being able to use script in the module xml 
 breaks encapsulation of modules, as I know have to include *all* 
 scripts from *all* libraries in *my* host page (for me that's 
 implementation details that I don't care about) .


 There's ScriptInjector 
 http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html
  
 to encapsulate loading within the module's code.
  

 I know superdevmode is still experimental and seriously hope that this 
 will be fixed. In the meantime does anyone have an idea how to work 
 around 
 this? Besides manually patching a 3rd party library...


 In your module that enables the SuperDevMode hooks, add the 
 failIfScriptTag configuration property and add an entry-point that uses 
 ScriptInjector to load the 3rd-party scripts. The 2 entry points (from 
 your 
 app, inherited GWT module, and from the SuperDevMode-specific module) will 
 both be executed; beware though that onModuleLoad will be called *before* 
 the scripts are loaded, so your code that depends on them has to wait a 
 bit… There are a couple ways to workaround this if really needed (but it's 
 a bit more invasive for your app; that being said, xsiframe is the 
 future, and might becomes the default at some point, so better be prepared 
 –and update your 3rd-party libs–)



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Cross Site Iframe Linker and Script Tags

2014-11-05 Thread Etienne Lacazedieu
Hi,

I'm preparing a big switch (GWT2.3 to 2.6.1, which may change to 2.7.0 
depening on the final release date), and I'm having trouble with the 
xsiframe linker.. I have no problems with adding script tags in the HTML 
file.

Actually, I wrote a linker (a subclass of CrossSiteIframeLinker), which 
outputs the list of JS files to a properties file.

On the server side, a class reads this file to add script tags (we use 
JSP).

My problem is that we have a rather complex integration process, with 
several GWT applications on the same page.


   - a Container app, which creates Desktop-like UI, and exposes some JS 
   native API to interact with other apps.
   - several Functional apps, each one containing one or more functional 
   modules. Each functional module description is injected to the container 
   app, which creates a launcher command. Invoking the command (done in the 
   container app) triggers the creation of the functional module UI (done in 
   the functional app). When this function returns, the container grabs the 
   new DOM element and creates a Window UI around it.


My problem with the XSI linker is that I cannot get it to work as it did 
before.. 

In my sample deployment, the container is called SampleGWTContainer, and 
the functional app is called SampleApplication.

I have the following error in the console : 

$wnd.SampleApplication.runAsyncCallback2 is not a function

The odd thing is that when I start SuperDevMode, and recompile 
SampleApplication, it works.
If I recompile SampleGWTContainer, I have the same error.

I still have to try to remove the split point, to make know if it is a 
Linker or a Code Splitting related problem..

Any idea that might help me out? 

Thanks a lot,

Etienne

Le mercredi 16 juillet 2014 11:28:33 UTC+2, Thomas Broyer a écrit :



 On Wednesday, July 16, 2014 11:06:43 AM UTC+2, gabriele.prandini wrote:

 This problem is blocking me from use superdevmode
 i have many 3th library, also gwt-ext... and gwt-ext have some script tag 
 on his gwt.xml
 so sad :-(


 As the error message says: add set-configuration-property 
 name='xsiframe.failIfScriptTag' value='FALSE'/ to your gwt.xml and put all 
 the needed script tags in your HTML host page (or inject them using 
 ScriptInjector from your onModuleLoad, deferring everything else until 
 after the scripts have been loaded)
  


 Il giorno lunedì 12 novembre 2012 17:54:58 UTC+1, Thomas Broyer ha 
 scritto:



 On Monday, November 12, 2012 4:55:58 PM UTC+1, googelybear wrote:

 I have the same error when running the code server and this limitation 
 effectively prevents me from using superdevmode, as in my case the problem 
 is with an external library that I include which then uses the script 
 tag 
 in its own module xml.
 Also not being able to use script in the module xml 
 breaks encapsulation of modules, as I know have to include *all* 
 scripts from *all* libraries in *my* host page (for me that's 
 implementation details that I don't care about) .


 There's ScriptInjector 
 http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html
  
 to encapsulate loading within the module's code.
  

 I know superdevmode is still experimental and seriously hope that this 
 will be fixed. In the meantime does anyone have an idea how to work around 
 this? Besides manually patching a 3rd party library...


 In your module that enables the SuperDevMode hooks, add the 
 failIfScriptTag configuration property and add an entry-point that uses 
 ScriptInjector to load the 3rd-party scripts. The 2 entry points (from your 
 app, inherited GWT module, and from the SuperDevMode-specific module) will 
 both be executed; beware though that onModuleLoad will be called *before* 
 the scripts are loaded, so your code that depends on them has to wait a 
 bit… There are a couple ways to workaround this if really needed (but it's 
 a bit more invasive for your app; that being said, xsiframe is the 
 future, and might becomes the default at some point, so better be prepared 
 –and update your 3rd-party libs–)



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Cross Site Iframe Linker and Script Tags

2014-07-16 Thread gabriele.prandini
This problem is blocking me from use superdevmode
i have many 3th library, also gwt-ext... and gwt-ext have some script tag 
on his gwt.xml
so sad :-(

Il giorno lunedì 12 novembre 2012 17:54:58 UTC+1, Thomas Broyer ha scritto:



 On Monday, November 12, 2012 4:55:58 PM UTC+1, googelybear wrote:

 I have the same error when running the code server and this limitation 
 effectively prevents me from using superdevmode, as in my case the problem 
 is with an external library that I include which then uses the script tag 
 in its own module xml.
 Also not being able to use script in the module xml 
 breaks encapsulation of modules, as I know have to include *all* scripts 
 from *all* libraries in *my* host page (for me that's implementation 
 details that I don't care about) .


 There's ScriptInjector 
 http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html
  
 to encapsulate loading within the module's code.
  

 I know superdevmode is still experimental and seriously hope that this 
 will be fixed. In the meantime does anyone have an idea how to work around 
 this? Besides manually patching a 3rd party library...


 In your module that enables the SuperDevMode hooks, add the 
 failIfScriptTag configuration property and add an entry-point that uses 
 ScriptInjector to load the 3rd-party scripts. The 2 entry points (from your 
 app, inherited GWT module, and from the SuperDevMode-specific module) will 
 both be executed; beware though that onModuleLoad will be called *before* 
 the scripts are loaded, so your code that depends on them has to wait a 
 bit… There are a couple ways to workaround this if really needed (but it's 
 a bit more invasive for your app; that being said, xsiframe is the 
 future, and might becomes the default at some point, so better be prepared 
 –and update your 3rd-party libs–)


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Cross Site Iframe Linker and Script Tags

2014-07-16 Thread Thomas Broyer


On Wednesday, July 16, 2014 11:06:43 AM UTC+2, gabriele.prandini wrote:

 This problem is blocking me from use superdevmode
 i have many 3th library, also gwt-ext... and gwt-ext have some script tag 
 on his gwt.xml
 so sad :-(


As the error message says: add set-configuration-property 
name='xsiframe.failIfScriptTag' value='FALSE'/ to your gwt.xml and put all 
the needed script tags in your HTML host page (or inject them using 
ScriptInjector from your onModuleLoad, deferring everything else until 
after the scripts have been loaded)
 


 Il giorno lunedì 12 novembre 2012 17:54:58 UTC+1, Thomas Broyer ha scritto:



 On Monday, November 12, 2012 4:55:58 PM UTC+1, googelybear wrote:

 I have the same error when running the code server and this limitation 
 effectively prevents me from using superdevmode, as in my case the problem 
 is with an external library that I include which then uses the script tag 
 in its own module xml.
 Also not being able to use script in the module xml 
 breaks encapsulation of modules, as I know have to include *all* 
 scripts from *all* libraries in *my* host page (for me that's 
 implementation details that I don't care about) .


 There's ScriptInjector 
 http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html
  
 to encapsulate loading within the module's code.
  

 I know superdevmode is still experimental and seriously hope that this 
 will be fixed. In the meantime does anyone have an idea how to work around 
 this? Besides manually patching a 3rd party library...


 In your module that enables the SuperDevMode hooks, add the 
 failIfScriptTag configuration property and add an entry-point that uses 
 ScriptInjector to load the 3rd-party scripts. The 2 entry points (from your 
 app, inherited GWT module, and from the SuperDevMode-specific module) will 
 both be executed; beware though that onModuleLoad will be called *before* 
 the scripts are loaded, so your code that depends on them has to wait a 
 bit… There are a couple ways to workaround this if really needed (but it's 
 a bit more invasive for your app; that being said, xsiframe is the 
 future, and might becomes the default at some point, so better be prepared 
 –and update your 3rd-party libs–)



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


App in iframe does top navigation

2014-07-08 Thread Harry Keller
Is there a way to avoid top navigation for a GWT app in an iframe?

I am putting my app into someone else's page, and they are putting it in an 
iframe.  The app takes over the entire window instead of limiting itself to 
the iframe.  If I turn off ALLOW_TOP_NAVIGATION, the app will not run at 
all.  The iframe is just empty.

This behavior is counter to all documentation that I have found.

Can anyone shed some light on this?  Is there a simple way to tell GWT not 
to use top navigation and to stay inside of the iframe?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


get scroll event from iframe

2013-08-22 Thread bhomass
there seems to be no way in GWT to get the iframe scrollEvent.

I tried

(com.google.gwt.dom.client.IFrameElement)frame.addDomHandler(newScrollHandler() 
{

   @Override

 public void onScroll(ScrollEvent event) {

  // do something

 }

 }, ScrollEvent.getType());

but the event does not fire when scrolling

inside the iframe, you can get

 Document document = iframe.getContentDocument(); 

but it does not have methods for adding listeners. there is no method for 
returning the contentWindow like in javascript.

any one knows any way to get the iframe scroll event?



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: gwt navigation with 3rd party app in iframe

2013-08-12 Thread Lance Frohman
I got the pages to not blink, but the back button does not work correctly,
you need to click it three times
to get to the page it should go to. It was doing this before I made your
fix.
thanks


On Fri, Aug 9, 2013 at 9:16 AM, Lance Frohman lfroh...@gmail.com wrote:

 Thank you.


 On Thursday, August 8, 2013 1:05:12 PM UTC-7, Jens wrote:

 You need to cache the activity that displays the 3rd party app so it does
 not get recreated in your ActivityMapper each time you navigate inside the
 3rd party app. So your URLs should look like

 /#ThirdPartyAppPlace:app=page1
 /#ThirdPartyAppPlace:app=**page2param=x
 /#ThirdPartyAppPlace:app=page3

 and for each URL the same activity instance should be returned. You could
 either code this caching into your AppActivityMapper directly or use GWT's
 CachingActivityMapper together with GWT's FilteredActivityMapper to keep
 your AppActivityMapper clean. If you choose to use GWT's ActivityMappers
 you must implement hashcode/equals for your place because
 CachingActivityMapper uses currentPlace.equals(newPlace) to determine if
 the cached activity can be returned.

 At the end you will have something like new
 FilteredActivityMapper(filter, new CachingActivityMapper(new
 AppActivityMapper()); where filter transforms all your
 ThirdPartyAppPlaces to an empty ThirdPartyAppPlace so that
 CachingActivityMapper always sees equal places. Whenever the
 CachingActivityMapper sees different places, it will ask your
 AppActivityMapper for the new activity.

 -- J.

  --
 You received this message because you are subscribed to a topic in the
 Google Groups Google Web Toolkit group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/google-web-toolkit/6U5rhALEomE/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-web-toolkit.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: gwt navigation with 3rd party app in iframe

2013-08-12 Thread Jens


 I got the pages to not blink, but the back button does not work correctly, 
 you need to click it three times
 to get to the page it should go to. It was doing this before I made your 
 fix.


Well thats expected as you update the URL whenever a navigation inside the 
3rd party app occurs. I thought this behavior is the one you already had 
but with blinking going on.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: gwt navigation with 3rd party app in iframe

2013-08-09 Thread Lance Frohman
Thank you.

On Thursday, August 8, 2013 1:05:12 PM UTC-7, Jens wrote:

 You need to cache the activity that displays the 3rd party app so it does 
 not get recreated in your ActivityMapper each time you navigate inside the 
 3rd party app. So your URLs should look like

 /#ThirdPartyAppPlace:app=page1
 /#ThirdPartyAppPlace:app=page2param=x
 /#ThirdPartyAppPlace:app=page3

 and for each URL the same activity instance should be returned. You could 
 either code this caching into your AppActivityMapper directly or use GWT's 
 CachingActivityMapper together with GWT's FilteredActivityMapper to keep 
 your AppActivityMapper clean. If you choose to use GWT's ActivityMappers 
 you must implement hashcode/equals for your place because 
 CachingActivityMapper uses currentPlace.equals(newPlace) to determine if 
 the cached activity can be returned.

 At the end you will have something like new FilteredActivityMapper(filter, 
 new CachingActivityMapper(new AppActivityMapper()); where filter 
 transforms all your ThirdPartyAppPlaces to an empty ThirdPartyAppPlace so 
 that CachingActivityMapper always sees equal places. Whenever the 
 CachingActivityMapper sees different places, it will ask your 
 AppActivityMapper for the new activity.

 -- J.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




gwt navigation with 3rd party app in iframe

2013-08-08 Thread Lance Frohman
I have a GWT application with navigation designed using the samples 
(Place,Activity,EventBus ...)
There is a navigation bar, and a Panel where the actual navigation takes 
place. In some
cases, the panel is filled with a third party app using a 
com.google.gwt.user.client.ui.Frame
iframe. The user can navigate in side the 3rd party app, and my app 
captures this and processes
it with the GWT navigation. The problem is that when the user is on page1 
with param1 and they
go to page2 with param2, I create Token page2:param2 and do a 
PlaceController.goTo(place).
But this causes the same page to get reloaded, it blinks. Is it possible 
to simulate the goTo(place)
by changing the URL to the new token and adding it into the PlaceHistory?

thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: gwt navigation with 3rd party app in iframe

2013-08-08 Thread Jens
You need to cache the activity that displays the 3rd party app so it does 
not get recreated in your ActivityMapper each time you navigate inside the 
3rd party app. So your URLs should look like

/#ThirdPartyAppPlace:app=page1
/#ThirdPartyAppPlace:app=page2param=x
/#ThirdPartyAppPlace:app=page3

and for each URL the same activity instance should be returned. You could 
either code this caching into your AppActivityMapper directly or use GWT's 
CachingActivityMapper together with GWT's FilteredActivityMapper to keep 
your AppActivityMapper clean. If you choose to use GWT's ActivityMappers 
you must implement hashcode/equals for your place because 
CachingActivityMapper uses currentPlace.equals(newPlace) to determine if 
the cached activity can be returned.

At the end you will have something like new FilteredActivityMapper(filter, 
new CachingActivityMapper(new AppActivityMapper()); where filter 
transforms all your ThirdPartyAppPlaces to an empty ThirdPartyAppPlace so 
that CachingActivityMapper always sees equal places. Whenever the 
CachingActivityMapper sees different places, it will ask your 
AppActivityMapper for the new activity.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: making RootPanel.clear(true) respects GWT loader iframe

2013-06-15 Thread Manuel Carrasco Moñino

Manuel Carrasco Moñino has posted comments on this change.

Change subject: making RootPanel.clear(true) respects GWT loader iframe
..


Patch Set 5:

(1 comment)


File user/src/com/google/gwt/user/client/ui/RootPanel.java
Line 340:GWT.getModuleName().equals(childElement.getId())) {
- This code does not work with real browsers unless you change it to the  
code below, Because Element.hasTagName() is case-sensitive and compares the  
argument against getTagName() which always returns UPPERCASE (see:  
http://www.w3schools.com/jsref/prop_element_tagname.asp).


  childElement.hasTagName(IFrameElement.TAG.toUpperCase())

A simpler solution could be to get the iframe before the loop and compare it

  moduleIframe = DOM.getElementById(GWT.getModuleName()) ;
  if (!childElement.equals(moduleIframe)) {} ...

- NOTICE: I think  we must preserve the 'script' with  
the 'moduleName.nocache.js' as well. Some times the user adds it to the  
body instead of to the head. I think that if we remove it,  XS linker would  
not load next fragments.


Out of subject:  In these cases I miss css selectors in gwt, something like:

 nodesToRemove = DOM.querySelectorAll(body  :not(#moduleName));


--
To view, visit https://gwt-review.googlesource.com/3430
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
Gerrit-PatchSet: 5
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: making RootPanel.clear(true) respects GWT loader iframe

2013-06-15 Thread Manuel Carrasco Moñino

Manuel Carrasco Moñino has posted comments on this change.

Change subject: making RootPanel.clear(true) respects GWT loader iframe
..


Patch Set 5:

(1 comment)


File user/src/com/google/gwt/user/client/ui/RootPanel.java
Line 340:GWT.getModuleName().equals(childElement.getId())) {
Forget the first part of my last comment, hasTagName was fixed in the patch  
https://gwt-review.googlesource.com/#/c/2975



--
To view, visit https://gwt-review.googlesource.com/3430
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
Gerrit-PatchSet: 5
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: making RootPanel.clear(true) respects GWT loader iframe

2013-06-14 Thread Daniel Kurka

Hello Leeroy Jenkins,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/3430

to look at the new patch set (#3).

Change subject: making RootPanel.clear(true) respects GWT loader iframe
..

making RootPanel.clear(true) respects GWT loader iframe

fixes issue 8200

Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
---
M user/src/com/google/gwt/user/client/ui/RootPanel.java
M user/test/com/google/gwt/user/client/ui/RootPanelTest.java
2 files changed, 49 insertions(+), 2 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/3430
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: making RootPanel.clear(true) respects GWT loader iframe

2013-06-14 Thread Thomas Broyer

Thomas Broyer has posted comments on this change.

Change subject: making RootPanel.clear(true) respects GWT loader iframe
..


Patch Set 1:

(1 comment)


File user/src/com/google/gwt/user/client/ui/RootPanel.java
Line 329: if (!shouldNodeBeRemoved(child)) {
Deattaching/reattaching an iframe should result in reloading its page, and  
I don't think that's what we want:


 When an iframe element is inserted into a document, the user agent must  
create
 a nested browsing context, and then process the iframe attributes for the  
first

 time.

 When an iframe element is removed from a document, the user agent must
 discard the nested browsing context.

 This happens without any unload events firing (the nested browsing context  
and

 its Document are discarded, not unloaded).

— Source:  
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#the-iframe-element


Because it's only about one element (for now, but it should remain only a  
handful elements in the future at most), and it's inserted at the end of  
the body (well, OK, the module could then add other elements after that,  
but the original purpose of clearDom was to clear everything on load), how  
about skipping it in each iteration? Would it really slow down things?


 while (containerElement.hasChildNodes()) {
   Node child = containerElement.getFirstChild();
   while (!shouldNodeBeRemoved(child)) {
 child = child.getNextSibling();
   }
   containerElement.removeChild(child);
 }

Also, is there really a big difference between hasChildNodes/getFirstChild  
and igetChildCount()/getChild(i) ? (and one that matters here, because I  
don't expect clearDom to be used that much, and in 99% of the cases it'll  
be used to remove a loading message, so losing a few milliseconds  
wouldn't really matter as the loading message would still be visible in  
the interim)


Another alternative would be to search for the first node that we want to  
keep and remove everything before it, and repeat that process until we  
reached the last child node. Or even better, mix getFirstChild and  
getNextSibling to really walk the DOM, skipping the appropriate nodes:


 Node child = containerElement.getFirstChild();
 while (child != null) {
   Node next = child.getNextSibling();
   if (shouldNodeBeRemoved(child)) {
 containerElement.removeChild(child);
   }
   child = next;
 }


--
To view, visit https://gwt-review.googlesource.com/3430
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: making RootPanel.clear(true) respects GWT loader iframe

2013-06-14 Thread Daniel Kurka

Hello Leeroy Jenkins,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/3430

to look at the new patch set (#4).

Change subject: making RootPanel.clear(true) respects GWT loader iframe
..

making RootPanel.clear(true) respects GWT loader iframe

fixes issue 8200

Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
---
M user/src/com/google/gwt/user/client/ui/RootPanel.java
M user/test/com/google/gwt/user/client/ui/RootPanelTest.java
2 files changed, 43 insertions(+), 3 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/3430
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: making RootPanel.clear(true) respects GWT loader iframe

2013-06-14 Thread Thomas Broyer

Thomas Broyer has posted comments on this change.

Change subject: making RootPanel.clear(true) respects GWT loader iframe
..


Patch Set 4: Code-Review+1

(1 comment)


File user/src/com/google/gwt/user/client/ui/RootPanel.java
Line 338:   if (iframe.equalsIgnoreCase(childElement.getTagName())
Ah sorry, missed it the first time: use  
childElement.hasTagName(IFrameElement.TAG)



--
To view, visit https://gwt-review.googlesource.com/3430
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: making RootPanel.clear(true) respects GWT loader iframe

2013-06-14 Thread Daniel Kurka

Hello Thomas Broyer, Leeroy Jenkins,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/3430

to look at the new patch set (#5).

Change subject: making RootPanel.clear(true) respects GWT loader iframe
..

making RootPanel.clear(true) respects GWT loader iframe

fixes issue 8200

Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
---
M user/src/com/google/gwt/user/client/ui/RootPanel.java
M user/test/com/google/gwt/user/client/ui/RootPanelTest.java
2 files changed, 44 insertions(+), 3 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/3430
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
Gerrit-PatchSet: 5
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: making RootPanel.clear(true) respects GWT loader iframe

2013-06-14 Thread Daniel Kurka

Daniel Kurka has posted comments on this change.

Change subject: making RootPanel.clear(true) respects GWT loader iframe
..


Patch Set 4:

(1 comment)


File user/src/com/google/gwt/user/client/ui/RootPanel.java
Line 338:   if (iframe.equalsIgnoreCase(childElement.getTagName())
Done


--
To view, visit https://gwt-review.googlesource.com/3430
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If876b04c453a1d4e170870e97f3a82d0d86599d5
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Daniel Kurka danku...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Drag and Drop to a RichTextArea / IFrame?

2013-06-04 Thread Dave
paranoiabla@... paranoiabla@... writes:

 
 
 I have the same problem. I can't drop into an iframe :( On Monday, August 
6, 2012 10:36:58 PM UTC+3, GWT Kid wrote:
 is there a solution for this ? How do we do drag and drop in 
richTextAreaOn Wed, Oct 26, 2011 at 9:55 AM, Derek derek...-
re5jqeeqqe8avxtiumw...@public.gmane.org wrote:I'm trying out some of the 
fun drag-and-drop stuff in GWT. My current
 attempt is to drag a file into a richtextarea, but nothing seems to be
 working correctly. It works fine if I use a FlowPanel or some other
 GWT widget, but not a RichTextArea despite it have an addDropHandler
 method.
 Anyone have any experience with this?
 My code in onModuleLoad:
 DropHandler drop = new DropHandler() {
          at Override
         public void onDrop(DropEvent event) {
                 event.preventDefault();
                 String data = event.getData(text);
                 GWT.log(text is +data+ and there are
 +numFiles(event.getDataTransfer())+ files);
         }
 };
 RichTextArea rt = new RichTextArea();
 rt.addDropHandler(drop); // never called even after drag-and-dropping
 a file on the rt
 RootPanel.get().add(rt);
 --
 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-we... at 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.
 
 
 
 
 
 
 


Did you find a solution?  I'm having the same problem.  I've tried it using 
JSNI too, it seems to get a few events then stops.  How did you solve this?

-Dave


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




Re: AdSense without iframe

2013-06-02 Thread kels124
I stumble on ur post becos I have similar issues trying to stay in line 
with adsense policies. and this was what I ended up with: 

span class=ad-left 

script type=text/javascript!--
google_ad_client = ca-pub-XX;
/* 336 X 280 wrapped in post */
google_ad_slot = XX;
google_ad_width = 336;
google_ad_height = 280;
//--
/script
script type=text/javascript
src=http://pagead2.googlesyndication.com/pagead/show_ads.js;
/script

/span

I will like to know if I had done a good job or not...my intention is to 
ensure that I don't have an iframe within the ads region also. Also, 
Knowing fully well that adsense code is an ifram on its own, how do I cope 
with violating adsense policies.

response need urgently!

Thanks

Pounds

On Wednesday, July 4, 2012 2:14:39 AM UTC+1, Kulnor wrote:

 I've been looking for an easy way to include an AdSense DIV in my GWT app 
 without using an iframe and my current approach is as follows:

 (1) In the application host page (i.e. application.html), I include the 
 standard adsense boiler code and put a @id on the wrapping div like:

 div id=adsense
 script type=text/javascript!--
 google_ad_client = xx-xxx-;
 /* OpenDDI 468x60 */
 google_ad_slot = xx;
 google_ad_width = 468;
 google_ad_height = 60;
 //--
 /script
 script type=text/javascript src=
 http://pagead2.googlesyndication.com/pagead/show_ads.js;
 /script
 /div

 (2) To integrate this as a Widget in the GWT application (for example in 
 the header), I rewrap it in an HTML widget that I can then position/control 
 at will:

 Element adsense = RootPanel.get(adsense).getElement();
 HTML adsenseWrapper = HTML.wrap(adsense);


 Can someone feedback on


- whether this complies with Google policies (as it is not wrapped in 
an iframe and essentially loads when the application page loads)?
- would there be any way to rotate the app by calling the embedded 
javascript (likewise in compliance with policies)? 

 thanks

 *K







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




How to set title of an iframe generated by GWT

2013-05-30 Thread Arindam Das
Hi GWT compiles and put things inside an iframe. But if I want to set title 
of that iframe how to do that?
The reason behind this is accessibility standard which demands a meaning 
title of an iframe.

Thanks in advance.

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


attachment: iframe.jpg

Re: How to set title of an iframe generated by GWT

2013-05-30 Thread Thomas Broyer


On Thursday, May 30, 2013 1:08:09 PM UTC+2, Arindam Das wrote:

 Hi GWT compiles and put things inside an iframe. But if I want to set 
 title of that iframe how to do that?
 The reason behind this is accessibility standard which demands a meaning 
 title of an iframe.


I must say I don't understand why you need it (accessibility standard 
which demands a meaning title of an iframe == bullshit), but if you really 
need it, and assuming you mean a title element in the doc loaded in the 
iframe, you can either:

   - use the XSLinker (add-linker name=xs/) which installs the code in 
   the main window rather than an iframe.
   - make your own linker copying the IframeLinker and replacing the 
   module prefix with one including a title
   - make your own linker extending CrossSiteIframeLinker and replacing the 
   install location script with a copy of 
   com/google/gwt/core/ext/linker/impl/installLocationIframe.js that includes 
   a title, or use 
   com/google/gwt/core/Ext/linker/impl/installLocationMainWindow.js which 
   doesn't use an iframe.

If you were rather talking about a title= attribute on the iframes, then 
it's almost the same, except you'll have to change the IframeTemplate.js 
file in the case of the IframeLinker.

I didn't personally tested any of the above though.

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




Re: How to set title of an iframe generated by GWT

2013-05-30 Thread David
Maybe he is not aware, that the IFrame he mentioned does not display any
GUI, it just contains the javascript sources. The UI is not rendered in
that IFrame but in the main window instead.

David

On Thu, May 30, 2013 at 1:37 PM, Thomas Broyer t.bro...@gmail.com wrote:



 On Thursday, May 30, 2013 1:08:09 PM UTC+2, Arindam Das wrote:

 Hi GWT compiles and put things inside an iframe. But if I want to set
 title of that iframe how to do that?
 The reason behind this is accessibility standard **which demands a
 meaning title of an iframe.


 I must say I don't understand why you need it (accessibility standard
 which demands a meaning title of an iframe == bullshit), but if you really
 need it, and assuming you mean a title element in the doc loaded in the
 iframe, you can either:

- use the XSLinker (add-linker name=xs/) which installs the code
in the main window rather than an iframe.
- make your own linker copying the IframeLinker and replacing the
module prefix with one including a title
- make your own linker extending CrossSiteIframeLinker and replacing
the install location script with a copy of
com/google/gwt/core/ext/linker/impl/installLocationIframe.js that includes
a title, or use
com/google/gwt/core/Ext/linker/impl/installLocationMainWindow.js which
doesn't use an iframe.

 If you were rather talking about a title= attribute on the iframes, then
 it's almost the same, except you'll have to change the IframeTemplate.js
 file in the case of the IframeLinker.

 I didn't personally tested any of the above though.

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




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




GWT application in iFrame

2013-04-24 Thread Imy
Hi,

I have a web app and it is called in an iFrame. This contains 2 slider 
elements and an output element. When the sliders are moved a calculation is 
fired and displayed in the output element. However, this works fine with 
all browsers except Chrome. When I move the sliders, the output element is 
not refreshed. This happens only if I select the result (for example).
I use GWT 2.4. Chrome (any version doesn't work)

Regards,
Timea

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




Re: Drag and Drop to a RichTextArea / IFrame?

2013-03-10 Thread paranoia...@gmail.com
I have the same problem. I can't drop into an iframe :( 

On Monday, August 6, 2012 10:36:58 PM UTC+3, GWT Kid wrote:

 is there a solution for this ? How do we do drag and drop in richTextArea

 On Wed, Oct 26, 2011 at 9:55 AM, Derek derek...@gmail.com 
 javascript:wrote:

 I'm trying out some of the fun drag-and-drop stuff in GWT. My current
 attempt is to drag a file into a richtextarea, but nothing seems to be
 working correctly. It works fine if I use a FlowPanel or some other
 GWT widget, but not a RichTextArea despite it have an addDropHandler
 method.

 Anyone have any experience with this?

 My code in onModuleLoad:

 DropHandler drop = new DropHandler() {

 @Override
 public void onDrop(DropEvent event) {
 event.preventDefault();

 String data = event.getData(text);
 GWT.log(text is +data+ and there are
 +numFiles(event.getDataTransfer())+ files);
 }
 };
 RichTextArea rt = new RichTextArea();
 rt.addDropHandler(drop); // never called even after drag-and-dropping
 a file on the rt
 RootPanel.get().add(rt);

 --
 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-we...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com javascript:.
 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 unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




IFrame BlurHandler event target

2013-01-22 Thread kjordan
Is there any way through GWT to get the target of a BlurHandler placed on 
an IFrame (specifically the one used in the HtmlEditor)?  I get the 
BlurEvent just fine, but getting what it blurred to seems problematic.  The 
getEventTarget() seems to return an EventTarget that is neither a Node nor 
an Element.  Sometimes a JSNI getter for document.activeElement returns the 
right element but mostly it seems to want to return the entire body element.

-- 
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/-/vfpSo1gmibUJ.
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.



iframe + radio button + flash

2012-12-05 Thread Jose María Zaragoza

Hello:


There is a issue in Chrome about pages with flash objects and iframes 
containing radio button.
The problem is a white border around this widget. 

http://code.google.com/p/chromium/issues/detail?id=141412

In this page there is an example 


It's a Chrome bug ( and very old , by the way ), but this bug affects in a 
serious way to all GWT applications running in hosted pages with flash 
elements.
I don't know why , but it looks like radio buttons are renderized inside 
iframe element and write them out of it. am I wrong ?
So,  it's a problem : all radio are painted with a ugly white border 

Does anyone know a workaround ? Setting the background color of the page to 
white is not a solution for me 
Does anyone know if Google (Chromium project) is solving this issue ?

Thanks and regards

 





-- 
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/-/1gnyvSO9r7UJ.
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: GWT Cross Site Iframe Linker and Script Tags

2012-11-16 Thread googelybear
Thanks for the pointer to the ScriptInjector, didn't know that before.

It's not that I don't want to update my libraries, but in my case the 3rd 
party library I am using to include flash content (gwt2swf) seems to be no 
longer maintained. So I guess I *have* to do it by myself using the 
ScriptInjector :-)

On Monday, November 12, 2012 5:54:58 PM UTC+1, Thomas Broyer wrote:



 On Monday, November 12, 2012 4:55:58 PM UTC+1, googelybear wrote:

 I have the same error when running the code server and this limitation 
 effectively prevents me from using superdevmode, as in my case the problem 
 is with an external library that I include which then uses the script tag 
 in its own module xml.
 Also not being able to use script in the module xml 
 breaks encapsulation of modules, as I know have to include *all* scripts 
 from *all* libraries in *my* host page (for me that's implementation 
 details that I don't care about) .


 There's 
 ScriptInjectorhttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.htmlto
  encapsulate loading within the module's code.
  

 I know superdevmode is still experimental and seriously hope that this 
 will be fixed. In the meantime does anyone have an idea how to work around 
 this? Besides manually patching a 3rd party library...


 In your module that enables the SuperDevMode hooks, add the 
 failIfScriptTag configuration property and add an entry-point that uses 
 ScriptInjector to load the 3rd-party scripts. The 2 entry points (from your 
 app, inherited GWT module, and from the SuperDevMode-specific module) will 
 both be executed; beware though that onModuleLoad will be called *before* 
 the scripts are loaded, so your code that depends on them has to wait a 
 bit… There are a couple ways to workaround this if really needed (but it's 
 a bit more invasive for your app; that being said, xsiframe is the 
 future, and might becomes the default at some point, so better be prepared 
 –and update your 3rd-party libs–)


-- 
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/-/Jxw4jr8zkvIJ.
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: GWT Cross Site Iframe Linker and Script Tags

2012-11-12 Thread googelybear
I have the same error when running the code server and this limitation 
effectively prevents me from using superdevmode, as in my case the problem 
is with an external library that I include which then uses the script tag 
in its own module xml.
Also not being able to use script in the module xml breaks encapsulation 
of modules, as I know have to include *all* scripts from *all* libraries in 
*my* host page (for me that's implementation details that I don't care 
about) . I know superdevmode is still experimental and seriously hope that 
this will be fixed. In the meantime does anyone have an idea how to work 
around this? Besides manually patching a 3rd party library...

cheers,
Mike


On Monday, July 23, 2012 4:33:01 PM UTC+2, Daniel wrote:

 Hi,
 can someone please explain to me the technical details why the xsiframe 
 Link can not compile GWT apps which load script tags in their .gwt.xml 
 module?
 It gives the following error:
 [ERROR] The Cross-Site-Iframe linker does not support script tags in the 
 gwt.xml files, but the gwt.xml file (or the gwt.xml files which it 
 includes) contains the following script tags: 
 .
 In order for your application to run correctly, you will need to include 
 these tags in your host page directly. In order to avoid this error, you 
 will need to remove the script tags from the gwt.xml file, or add this 
 property to the gwt.xml file: set-configuration-property 
 name='xsiframe.failIfScriptTag' value='FALSE'/

 The error message already tells the workaround, so I know how to compile 
 it. Still, I'm wondering about the reason why it can't compile with 
 script tags? I understand the same origin policy problem with the regular 
 Iframe Linker and XHR. But including a script tag doesn't require XHR. So 
 whats the technical reason behind this?

 Thanks


-- 
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/-/y_V5cTvKRJMJ.
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: GWT Cross Site Iframe Linker and Script Tags

2012-11-12 Thread Thomas Broyer


On Monday, November 12, 2012 4:55:58 PM UTC+1, googelybear wrote:

 I have the same error when running the code server and this limitation 
 effectively prevents me from using superdevmode, as in my case the problem 
 is with an external library that I include which then uses the script tag 
 in its own module xml.
 Also not being able to use script in the module xml breaks encapsulation 
 of modules, as I know have to include *all* scripts from *all* libraries 
 in *my* host page (for me that's implementation details that I don't care 
 about) .


There's 
ScriptInjectorhttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.htmlto
 encapsulate loading within the module's code.
 

 I know superdevmode is still experimental and seriously hope that this 
 will be fixed. In the meantime does anyone have an idea how to work around 
 this? Besides manually patching a 3rd party library...


In your module that enables the SuperDevMode hooks, add the failIfScriptTag 
configuration property and add an entry-point that uses ScriptInjector to 
load the 3rd-party scripts. The 2 entry points (from your app, inherited 
GWT module, and from the SuperDevMode-specific module) will both be 
executed; beware though that onModuleLoad will be called *before* the 
scripts are loaded, so your code that depends on them has to wait a bit… 
There are a couple ways to workaround this if really needed (but it's a bit 
more invasive for your app; that being said, xsiframe is the future, and 
might becomes the default at some point, so better be prepared –and update 
your 3rd-party libs–)

-- 
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/-/LvKDyjfal8IJ.
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.



iframe event / gwt 2.5

2012-10-27 Thread Hugues Lara
Hi,

I want to fire a popup when i click in an iFrame and get the target element 
in order to recover his id. Why the ONCLICK event don't work ?
The ONLOAD work perfectly.

Thanks

Code Sample :

package com.exp.client;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.Window;

public class CustomFrame extends Frame {
 public CustomFrame(){
sinkEvents(Event.ONCLICK);
sinkEvents(Event.ONLOAD);
setUrl(http://examples.roughian.com/index.htm#Listeners~EventListener;);
setSize(900px,900px);
}
 public void onBrowserEvent(Event event){
super.onBrowserEvent(event);
switch (DOM.eventGetType(event))
{
case Event.ONCLICK:
Window.alert(ONCLICK : + event.getEventTarget().toString() );
DOM.eventPreventDefault(event);
break;
case Event.ONLOAD:
Window.alert(ONLOAD);
DOM.eventPreventDefault(event);
break;
}
}
}

-- 
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/-/leQwWBqEOp0J.
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: GWT Cross Site Iframe Linker and Script Tags

2012-09-28 Thread skrat
This sucks great time, now that devmode plugins have been abandoned 
(surprise!), and Super Dev Mode was forced onto us, xsiframe became a must, 
and all the GWT libraries and apps that use script tags are not working 
anymore. What's wrong with document.write anyway? I'm really angry now with 
Google, and we're going to rewrite the app with JS, Backbone, jQuery, who 
knows. At least stuff won't break because of ridiculous developer 
decisions. Thanks Google

-- 
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/-/dLk5b77VnZIJ.
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: GWT Cross Site Iframe Linker and Script Tags

2012-09-28 Thread Thomas Broyer


On Friday, September 28, 2012 4:36:41 PM UTC+2, skrat wrote:

 This sucks great time, now that devmode plugins have been abandoned 
 (surprise!),


Are you kidding?!
Brian spent days (weeks?) releasing the plugin for Firefox 15 (there was 
more changes from Mozilla's side than for previous releases) and fixing the 
plugin for Chrome, porting it to manifest v2 so that it can be submitted on 
the Chrome Web Store (he's not done yet, only the linux binaries have been 
recompiled for now).
Please have a look at the SVN 
http://code.google.com/p/google-web-toolkit/source/list?path=/trunk/plugins/ 
and/or 
http://gwt-code-reviews.appspot.com before making such assertions.

-- 
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/-/3eQzcOuKi2EJ.
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.



How get iFrame contents with different domains ?

2012-09-25 Thread Nabil
Hi,

i have created an iFrame in my project that calls an external service (for 
example whatismyip.com) that returns my public IP.
the problem is i cant get iFrame content, because there is a completly 
different domains.
the question is how can i get this iFrame contents ? its very urgent please 
!

Thank you

-- 
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/-/_HHds9xI1ToJ.
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: How get iFrame contents with different domains ?

2012-09-25 Thread gpike
Hi,

  You can't directly in GWT it honors cross site scripting you can however 
drop down to Javascript. Write a JSNI method that accesses the containing 
docs parent (your app) by accessing top, then in your code you can access 
the iFrame and then it's document. Something like this:

public static DocumentElement getFrameDocumtent() {
FrameElement top = getTopDocument().getElementById(MyiFrame);
return top.getContentDocument();
}

public static native Document getTopDocument() /*-{
return top.document;
}-*/;

I haven't tested this code but pulled pieces from some of my working code 
to give you an idea.

Hope that helps,

Gordon Pike
gwtcasts.com
easygwt.com

On Friday, September 21, 2012 2:28:25 AM UTC-6, Coco Gwt wrote:

 Hi,

 i have created an iFrame in my project that calls an external service (for 
 example whatismyip.com) that returns my public IP.
 the problem is i cant get iFrame content, because there is a completly 
 different domains.
 the question is how can i get this iFrame contents ? its very urgent 
 please !

 Thank you


-- 
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/-/9ai_kotJqZIJ.
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: How get iFrame contents with different domains ?

2012-09-25 Thread gpike


On Friday, September 21, 2012 2:28:25 AM UTC-6, Coco Gwt wrote:

 Hi,

 i have created an iFrame in my project that calls an external service (for 
 example whatismyip.com) that returns my public IP.
 the problem is i cant get iFrame content, because there is a completly 
 different domains.
 the question is how can i get this iFrame contents ? its very urgent 
 please !

 Thank you


-- 
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/-/lmB_d13LWCAJ.
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: How get iFrame contents with different domains ?

2012-09-25 Thread gpike
After sending this I realized I sent it too early. The code below only 
works after you get both documents under the same domain because of 
cross-site scripting protection in the browser. To bring them both under 
the same domain you can either setup Apache or Nginx as reverse-proxy or 
write a servlet deployed with your GWT server side code that proxies 
requests to the other domain. If you just have a couple of pages to proxy I 
would do the servlet approach. I've done both methods. There are a couple 
of example proxy servlets you could start with and deploy one of them in 
your web.xml.

Thanks,

Gordon Pike
gwtcasts.com
easygwt.com

On Tuesday, September 25, 2012 10:26:53 AM UTC-6, gpike wrote:

 Hi,

   You can't directly in GWT it honors cross site scripting you can however 
 drop down to Javascript. Write a JSNI method that accesses the containing 
 docs parent (your app) by accessing top, then in your code you can access 
 the iFrame and then it's document. Something like this:

 public static DocumentElement getFrameDocumtent() {
 FrameElement top = getTopDocument().getElementById(MyiFrame);
 return top.getContentDocument();
 }

 public static native Document getTopDocument() /*-{
 return top.document;
 }-*/;

 I haven't tested this code but pulled pieces from some of my working code 
 to give you an idea.

 Hope that helps,

 Gordon Pike
 gwtcasts.com
 easygwt.com

 On Friday, September 21, 2012 2:28:25 AM UTC-6, Coco Gwt wrote:

 Hi,

 i have created an iFrame in my project that calls an external service 
 (for example whatismyip.com) that returns my public IP.
 the problem is i cant get iFrame content, because there is a completly 
 different domains.
 the question is how can i get this iFrame contents ? its very urgent 
 please !

 Thank you



-- 
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/-/dlSxNuydlFAJ.
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: How get iFrame contents with different domains ?

2012-09-25 Thread Кирилл Карпенко
You cannot do this the way you want. It is simply does not allowed by the
most of browsers.

There is only possible way you can to choose is to build extension which
browser grant extended permissions set. But user must setup it explicitly.
 25.09.2012 18:58 пользователь Nabil chane.na...@gmail.com написал:

 Hi,

 i have created an iFrame in my project that calls an external service (for
 example whatismyip.com) that returns my public IP.
 the problem is i cant get iFrame content, because there is a completly
 different domains.
 the question is how can i get this iFrame contents ? its very urgent
 please !

 Thank you

 --
 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/-/_HHds9xI1ToJ.
 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.


-- 
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-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: printing problem: when I print content of my iframe (I use gwt-print-it) all what is left on the right side of printable page is cut off and stays not printed at all

2012-09-20 Thread Jeffrey Chimene
On 09/18/2012 06:02 PM, Jan Przybylo wrote:

 no, I don't want to print double-sided document.


@media css has nothing to do with double-sided printing.

Cheers,
jec

 let me explain it:
 imagine you have empty page with just one big image inside 'body'
 element:
 body
img src=... style=width: 3000px; height: 2200px; /
 /body

 lets say it looks like this:

 http://why.net.pl/tmp/0.png


 and you want to print WHOLE image. So you'd expect your printer to
 print something like this:

 http://why.net.pl/tmp/1_.png

 but instead of this I'm getting something like this printed:

 http://why.net.pl/tmp/2_.png

 so it's not whole image.
 of course my problem is not about image but very big HTML form that
 has fixed width and height. This form cannot be resized. Fields on
 this form cannot be positioned differently, they are positioned with
 absolute positioning and they have to stay in their places.
 So my question is:
what do I have to do in order to print wide elements that won't fit
 in one page (when it comes to element's width)?

 as I previously mentioned I already use gwt-print-it.





 W dniu wtorek, 18 września 2012 16:36:45 UTC-4 użytkownik jchimene
 napisał:

 Are you using @media css?
 http://www.w3.org/TR/CSS2/page.html#page-selectors
 http://www.w3.org/TR/CSS2/page.html#page-selectors

 On Mon, Sep 17, 2012 at 12:29 PM, Jan Przybylo
 jan.pr...@gmail.com javascript: wrote:

 I print big form that has fixed dimensions. If I'd use Letter
 parer size it should fit in 4 pages (2 pages wide and 2 pages
 high).
 I already started using PrintIt class (gwt-print-it) and it
 solves most basic problems for me.
 But when I try to print whole big form it only prints top left
 as the 1st page and top bottom as the 2nd page leaving the
 right side not printed.

 Does anyone know proper way of printing wide big pages?
 -- 


 -- 
 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/-/O6LWSBf8EE0J.
 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.

-- 
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-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: printing problem: when I print content of my iframe (I use gwt-print-it) all what is left on the right side of printable page is cut off and stays not printed at all

2012-09-20 Thread Ed
Have You tried

a href=# 
view-source:https://hrapp1.secep.net/HR/cyberobjects/CyberObjects.html?LOADTABLENAME=PEOPLELOADTABLEGROUP=PEOPLELOADTABLEACTION=GETID=20798#
onclick=print(); return false;Print/a

Using javascript print function

E



On Thu, Sep 20, 2012 at 7:46 AM, Jeffrey Chimene jchim...@gmail.com wrote:

  On 09/18/2012 06:02 PM, Jan Przybylo wrote:

 no, I don't want to print double-sided document.


 @media css has nothing to do with double-sided printing.

 Cheers,
 jec

  let me explain it:
 imagine you have empty page with just one big image inside 'body' element:
 body
img src=... style=width: 3000px; height: 2200px; /
 /body

 lets say it looks like this:

 http://why.net.pl/tmp/0.png

 and you want to print WHOLE image. So you'd expect your printer to print
 something like this:

  http://why.net.pl/tmp/1_.png

 but instead of this I'm getting something like this printed:

 http://why.net.pl/tmp/2_.png
 so it's not whole image.
 of course my problem is not about image but very big HTML form that has
 fixed width and height. This form cannot be resized. Fields on this form
 cannot be positioned differently, they are positioned with absolute
 positioning and they have to stay in their places.
 So my question is:
what do I have to do in order to print wide elements that won't fit in
 one page (when it comes to element's width)?

 as I previously mentioned I already use gwt-print-it.





 W dniu wtorek, 18 września 2012 16:36:45 UTC-4 użytkownik jchimene
 napisał:

 Are you using @media css?
 http://www.w3.org/TR/CSS2/**page.html#page-selectorshttp://www.w3.org/TR/CSS2/page.html#page-selectors

 On Mon, Sep 17, 2012 at 12:29 PM, Jan Przybylo jan.pr...@gmail.comwrote:

 I print big form that has fixed dimensions. If I'd use Letter parer size
 it should fit in 4 pages (2 pages wide and 2 pages high).
 I already started using PrintIt class (gwt-print-it) and it solves most
 basic problems for me.
 But when I try to print whole big form it only prints top left as the
 1st page and top bottom as the 2nd page leaving the right side not printed.

 Does anyone know proper way of printing wide big pages?
 --


  --
 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/-/O6LWSBf8EE0J.
 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.


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


-- 
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-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: printing problem: when I print content of my iframe (I use gwt-print-it) all what is left on the right side of printable page is cut off and stays not printed at all

2012-09-20 Thread Freller

Hi Jan,

This is browser/OS dependable.

Regards,
Freller


Em segunda-feira, 17 de setembro de 2012 14h29min04s UTC-3, Jan Przybylo 
escreveu:

 I print big form that has fixed dimensions. If I'd use Letter parer size 
 it should fit in 4 pages (2 pages wide and 2 pages high). 
 I already started using PrintIt class (gwt-print-it) and it solves most 
 basic problems for me. 
 But when I try to print whole big form it only prints top left as the 1st 
 page and top bottom as the 2nd page leaving the right side not printed. 

 Does anyone know proper way of printing wide big pages?


-- 
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/-/NO6SWr5S8iMJ.
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: printing problem: when I print content of my iframe (I use gwt-print-it) all what is left on the right side of printable page is cut off and stays not printed at all

2012-09-18 Thread Jeff Chimene
Are you using @media css?
http://www.w3.org/TR/CSS2/page.html#page-selectors

On Mon, Sep 17, 2012 at 12:29 PM, Jan Przybylo jan.przyb...@gmail.comwrote:

 I print big form that has fixed dimensions. If I'd use Letter parer size
 it should fit in 4 pages (2 pages wide and 2 pages high).
 I already started using PrintIt class (gwt-print-it) and it solves most
 basic problems for me.
 But when I try to print whole big form it only prints top left as the 1st
 page and top bottom as the 2nd page leaving the right side not printed.

 Does anyone know proper way of printing wide big pages?

 --
 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/-/Nbf7cUYFL2cJ.
 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.


-- 
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-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: printing problem: when I print content of my iframe (I use gwt-print-it) all what is left on the right side of printable page is cut off and stays not printed at all

2012-09-18 Thread Jan Przybylo


no, I don't want to print double-sided document. 
let me explain it: 
imagine you have empty page with just one big image inside 'body' element: 
body 
   img src=... style=width: 3000px; height: 2200px; /
/body

lets say it looks like this:

http://why.net.pl/tmp/0.png

and you want to print WHOLE image. So you'd expect your printer to print 
something like this: 

http://why.net.pl/tmp/1_.png

but instead of this I'm getting something like this printed: 

http://why.net.pl/tmp/2_.png
so it's not whole image. 
of course my problem is not about image but very big HTML form that has 
fixed width and height. This form cannot be resized. Fields on this form 
cannot be positioned differently, they are positioned with absolute 
positioning and they have to stay in their places. 
So my question is: 
   what do I have to do in order to print wide elements that won't fit in 
one page (when it comes to element's width)?

as I previously mentioned I already use gwt-print-it.





W dniu wtorek, 18 września 2012 16:36:45 UTC-4 użytkownik jchimene napisał:

 Are you using @media css?
 http://www.w3.org/TR/CSS2/page.html#page-selectors

 On Mon, Sep 17, 2012 at 12:29 PM, Jan Przybylo 
 jan.pr...@gmail.comjavascript:
  wrote:

 I print big form that has fixed dimensions. If I'd use Letter parer size 
 it should fit in 4 pages (2 pages wide and 2 pages high). 
 I already started using PrintIt class (gwt-print-it) and it solves most 
 basic problems for me. 
 But when I try to print whole big form it only prints top left as the 1st 
 page and top bottom as the 2nd page leaving the right side not printed. 

 Does anyone know proper way of printing wide big pages?
 -- 




-- 
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/-/O6LWSBf8EE0J.
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.



printing problem: when I print content of my iframe (I use gwt-print-it) all what is left on the right side of printable page is cut off and stays not printed at all

2012-09-17 Thread Jan Przybylo
I print big form that has fixed dimensions. If I'd use Letter parer size it 
should fit in 4 pages (2 pages wide and 2 pages high). 
I already started using PrintIt class (gwt-print-it) and it solves most 
basic problems for me. 
But when I try to print whole big form it only prints top left as the 1st 
page and top bottom as the 2nd page leaving the right side not printed. 

Does anyone know proper way of printing wide big pages?

-- 
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/-/Nbf7cUYFL2cJ.
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: Iframe takes more time to load local html page in IE

2012-08-17 Thread David
Try using RequestBuilder.java instead of the iframe.

On Wednesday, August 15, 2012 9:04:44 PM UTC-4, mathews wrote:

 Iframe is taking more time to load local html page in IE when compared to 
 Firefox. if we add iframe in new dialog/window, it is a taking more time to 
 load the page in IE, is there any way to speed up the Iframe page load in 
 IE.

 Thanks.



-- 
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/-/yfIOI_IqfQwJ.
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.



Iframe takes more time to load local html page in IE

2012-08-16 Thread mathews


Iframe is taking more time to load local html page in IE when compared to 
Firefox. if we add iframe in new dialog/window, it is a taking more time to 
load the page in IE, is there any way to speed up the Iframe page load in 
IE.

Thanks.

-- 
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/-/Rv4MS657tPsJ.
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: GWT Cross Site Iframe Linker and Script Tags

2012-08-08 Thread blurk
On Tuesday, July 24, 2012 11:32:56 AM UTC+2, Daniel wrote:
 Thanks for the explanation.
 I find this very interesting. This means I'll be able to extend 
 the CrossSiteIframeLinker Linker and overwrite 
 the fillSelectionScriptTemplate() function to include all required scripts 
 with sth like document.write() 
 or document.getElementsByTagName(head)[0].appendChild()
 
 
 And to guarantee that they are present during onModuleLoad() there should be 
 a couple of workarounds, like checking in every entry point module if scripts 
 are ready (with sth like typeof LibraryName === undefined) and if not 
 postpone startup until they are ready.
 Or maybe taking a closer look at the regular IFrameLinker. From what I see 
 right now it basically uses document.write(script 
 defer=defermodule.onInjectionDone('module')/script) and then 
 calls maybeStartModule() which hopefully will have code I can reuse.
 
 
 And the reason google didn't include this in their CrossSiteIframeLinker is 
 because they didn't want to use document.write() for this linker?

do you have found how to handle that; i have the same trouble

-- 
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/-/ULWKN3Drqg8J.
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: Drag and Drop to a RichTextArea / IFrame?

2012-08-06 Thread gangurg gangurg
is there a solution for this ? How do we do drag and drop in richTextArea

On Wed, Oct 26, 2011 at 9:55 AM, Derek derekad...@gmail.com wrote:

 I'm trying out some of the fun drag-and-drop stuff in GWT. My current
 attempt is to drag a file into a richtextarea, but nothing seems to be
 working correctly. It works fine if I use a FlowPanel or some other
 GWT widget, but not a RichTextArea despite it have an addDropHandler
 method.

 Anyone have any experience with this?

 My code in onModuleLoad:

 DropHandler drop = new DropHandler() {

 @Override
 public void onDrop(DropEvent event) {
 event.preventDefault();

 String data = event.getData(text);
 GWT.log(text is +data+ and there are
 +numFiles(event.getDataTransfer())+ files);
 }
 };
 RichTextArea rt = new RichTextArea();
 rt.addDropHandler(drop); // never called even after drag-and-dropping
 a file on the rt
 RootPanel.get().add(rt);

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



-- 
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-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: GWT Cross Site Iframe Linker and Script Tags

2012-07-24 Thread Thomas Broyer

On Monday, July 23, 2012 4:33:01 PM UTC+2, Daniel wrote:

 Hi,
 can someone please explain to me the technical details why the xsiframe 
 Link can not compile GWT apps which load script tags in their .gwt.xml 
 module?
 It gives the following error:
 [ERROR] The Cross-Site-Iframe linker does not support script tags in the 
 gwt.xml files, but the gwt.xml file (or the gwt.xml files which it 
 includes) contains the following script tags: 
 .
 In order for your application to run correctly, you will need to include 
 these tags in your host page directly. In order to avoid this error, you 
 will need to remove the script tags from the gwt.xml file, or add this 
 property to the gwt.xml file: set-configuration-property 
 name='xsiframe.failIfScriptTag' value='FALSE'/

 The error message already tells the workaround, so I know how to compile 
 it. Still, I'm wondering about the reason why it can't compile with 
 script tags? I understand the same origin policy problem with the regular 
 Iframe Linker and XHR. But including a script tag doesn't require XHR. So 
 whats the technical reason behind this?


It's not about the SOP (not directly at least), it's about how the 
*.cache.* script is (or can be) injected.
scripts in gwt.xml are guaranteed to be fully loaded by by the time the 
onModuleLoad is called, so you can directly make calls to functions or 
objects declared in those scripts. This is done by using document.write()s 
and some trickery to make it work in all browsers. The xsiframe linker no 
longer uses document.write, so it couldn't guarantee the loading order; as 
a consequence, scripts are simply not injected (at all); they fail the 
build by default, or can be ignored with the xsiframe.failIfScriptTag 
configuration property.

-- 
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/-/BRVnQ66RGY4J.
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: GWT Cross Site Iframe Linker and Script Tags

2012-07-24 Thread Daniel
Thanks for the explanation.
I find this very interesting. This means I'll be able to extend 
the CrossSiteIframeLinker Linker and overwrite 
the fillSelectionScriptTemplate() function to include all required scripts 
with sth like document.write() 
or document.getElementsByTagName(head)[0].appendChild()

And to guarantee that they are present during onModuleLoad() there should 
be a couple of workarounds, like checking in every entry point module if 
scripts are ready (with sth like typeof LibraryName === undefined) and if 
not postpone startup until they are ready.
Or maybe taking a closer look at the regular IFrameLinker. From what I see 
right now it basically uses document.write(script 
defer=defermodule.onInjectionDone('module')/script) and then 
calls maybeStartModule() which hopefully will have code I can reuse.

And the reason google didn't include this in their CrossSiteIframeLinker is 
because they didn't want to use document.write() for this linker?

-- 
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/-/3ExS87Gc7XcJ.
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.



GWT Cross Site Iframe Linker and Script Tags

2012-07-23 Thread Daniel
Hi,
can someone please explain to me the technical details why the xsiframe 
Link can not compile GWT apps which load script tags in their .gwt.xml 
module?
It gives the following error:
[ERROR] The Cross-Site-Iframe linker does not support script tags in the 
gwt.xml files, but the gwt.xml file (or the gwt.xml files which it 
includes) contains the following script tags: 
.
In order for your application to run correctly, you will need to include 
these tags in your host page directly. In order to avoid this error, you 
will need to remove the script tags from the gwt.xml file, or add this 
property to the gwt.xml file: set-configuration-property 
name='xsiframe.failIfScriptTag' value='FALSE'/

The error message already tells the workaround, so I know how to compile 
it. Still, I'm wondering about the reason why it can't compile with 
script tags? I understand the same origin policy problem with the regular 
Iframe Linker and XHR. But including a script tag doesn't require XHR. So 
whats the technical reason behind this?

Thanks

-- 
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/-/vWhzpfWvWNgJ.
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.



Show Iframe of html server that was uploaded to a server first

2012-07-16 Thread Saik0
Hi @all,

i have created a html file within my gwt app and uploaded it to a server. 
As a callback i retriev the server url from this file.

Now i wan't to display this html file into a iframe with the 
com.google.gwt.user.client.ui.Frame Widget. This Widget is a child of the 
DialogBox Widget. If i try to add a external url like google it works but 
not with the url from the server.

What i'm missing?

kind regards
Saik0

-- 
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/-/NomnNvbiUQEJ.
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.



GWT calling java from JS doesn't work with Iframe

2012-07-15 Thread Ahmed Saad


Hi All I have a problem that I can java from javascript normally in GWT 
application but when I run it in Iframe it doesn't work here is the work 
that works fine if I run from browser window but doesnt work in Iframe the 
html file

 input type=button onclick=doIT() value=Do class=fbbotton 
 style=margin-left: 20px /

the Java file 

 $wnd.doIT =@com.application.client.application::saad();
 static void saad()
 {
 GWT.log(saad);
 }

it works fine id I didnt run the page in Iframe 

-- 
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/-/J5G_gykrddgJ.
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: GWT calling java from JS doesn't work with Iframe

2012-07-15 Thread Joseph Lust
One way this error can also be caused is that you did not *publish* that 
public method before you called it. You need to ensure you've got a JSNI 
method (like the one you posted) that is run onModuleLoad to add your 
public JS functions to the window's namespace. 

Of course you can use GWT to set the listener on the *input* element and 
skip the JSNI bit if you like. 

Sincerely,
Joseph

-- 
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/-/v_4ZT5EznsIJ.
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.



AdSense without iframe

2012-07-03 Thread Kulnor
I've been looking for an easy way to include an AdSense DIV in my GWT app 
without using an iframe and my current approach is as follows:

(1) In the application host page (i.e. application.html), I include the 
standard adsense boiler code and put a @id on the wrapping div like:

div id=adsense
script type=text/javascript!--
google_ad_client = xx-xxx-;
/* OpenDDI 468x60 */
google_ad_slot = xx;
google_ad_width = 468;
google_ad_height = 60;
//--
/script
script type=text/javascript src=
http://pagead2.googlesyndication.com/pagead/show_ads.js;
/script
/div

(2) To integrate this as a Widget in the GWT application (for example in 
the header), I rewrap it in an HTML widget that I can then position/control 
at will:

Element adsense = RootPanel.get(adsense).getElement();
HTML adsenseWrapper = HTML.wrap(adsense);


Can someone feedback on


   - whether this complies with Google policies (as it is not wrapped in an 
   iframe and essentially loads when the application page loads)?
   - would there be any way to rotate the app by calling the embedded 
   javascript (likewise in compliance with policies)? 

thanks

*K





-- 
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/-/OxnNegvVBFkJ.
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 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.



preview in case of iframe

2012-07-01 Thread bhomass
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 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: Popup Panels are always displayed behind the youtube iframe

2011-12-27 Thread George Simon K
I too had this issue. Opaque fixed. Thanks

On Tue, Sep 20, 2011 at 12:33 AM, erebrus ereb...@gmail.com wrote:

 Thanks, that did it.

 On Sep 19, 2:47 pm, KevMo kevinps...@gmail.com wrote:
  Try adding wmode=Opaque to the end of the iFrame URL.
 
  On Sep 19, 1:16 am, erebrus ereb...@gmail.com wrote:
 
 
 
 
 
 
 
   Hi,
   I have HTMLPanel in which I include an iframe with a youtube. My
   problem is that whenever I display a popup panel (e.g. custom made
   dialog boxes) that youtube iframe is always displayed on top of the
   popup panel?
   Does anybody know how to solve this problem?
 
   Thanks

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



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



Calling a method in parent of an iframe

2011-12-07 Thread Shrivallabh
Folks,

I have 2 modules - A and B.

I have a set of tabs as a part of module A.

tab 5 contains and iframe.

The contents of the iframe are loaded from module B.

I need to find a way to refresh the contents of tab 4 from within the
iframe in tab5.

It should be somethings like
1. Get my parent.
2. Figure out the handle to an object on tab 4.
3. Refresh it,


The object on tab 4 is not the dom object itself. Its a a regular GWT
object that knows how to go handle the logic and exposes a refresh
function.

So looking up by id for a dom element is not what is desired.

Am I looking at the realms of impossibility?

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



IFrame to https url not working in Firefox

2011-11-17 Thread gerry
Hi all,

I have an application that is secured with an unsigned ssl
certificate. I have a second application, which is a TabPanel, and on
one tab I need to include the first application, as an iFrame, using a
Frame object. In development mode, in chrome, it returns a 501
(net::ERR_INSECURE_RESPONSE) error, but it works when deployed (you
get the warning and you can click continue). In Firefox it does not
work. The page is displayed but it seems like no javascript is
rendered, you can see only the css background. I assume this is
because of the ssl because it's working if I use a random http url
(not https). Is there something I can do for this?

The fact that it displays a warning before you can continue is not
really bothering me, because on real production we can use a paid ssl
certificate.

Is there another way I can include the first application into the
second? The problem is that it is an entirely different application,
with a different entry point and HTML structure, that's why I tried to
use an iframe.

Any help would be greatly appreciated.

-- 
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-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: IFrame to https url not working in Firefox

2011-11-17 Thread Paul Robinson

Why not sign the certificate yourself? The result won't be trusted, and will 
generate a browser warning, but it will more faithfully represent what happens 
in production.

Google for something like self signed ssl certificate to work out how to do 
it.

HTH
Paul

On 17/11/11 10:08, gerry wrote:

Hi all,

I have an application that is secured with an unsigned ssl
certificate. I have a second application, which is a TabPanel, and on
one tab I need to include the first application, as an iFrame, using a
Frame object. In development mode, in chrome, it returns a 501
(net::ERR_INSECURE_RESPONSE) error, but it works when deployed (you
get the warning and you can click continue). In Firefox it does not
work. The page is displayed but it seems like no javascript is
rendered, you can see only the css background. I assume this is
because of the ssl because it's working if I use a random http url
(not https). Is there something I can do for this?

The fact that it displays a warning before you can continue is not
really bothering me, because on real production we can use a paid ssl
certificate.

Is there another way I can include the first application into the
second? The problem is that it is an entirely different application,
with a different entry point and HTML structure, that's why I tried to
use an iframe.

Any help would be greatly appreciated.



--
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-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: IFrame to https url not working in Firefox

2011-11-17 Thread gerry
Hi Paul,

Thanks for the reply. Sorry, I was misleading in my description of the
problem. Yes, the certificate is signed by us, and it generates a
browser warning. But the application does not work at all when called
from inside an iframe.

On 17 Νοέ, 12:18, Paul Robinson ukcue...@gmail.com wrote:
 Why not sign the certificate yourself? The result won't be trusted, and will 
 generate a browser warning, but it will more faithfully represent what 
 happens in production.

 Google for something like self signed ssl certificate to work out how to do 
 it.

 HTH
 Paul

 On 17/11/11 10:08, gerry wrote:







  Hi all,

  I have an application that is secured with an unsigned ssl
  certificate. I have a second application, which is a TabPanel, and on
  one tab I need to include the first application, as an iFrame, using a
  Frame object. In development mode, in chrome, it returns a 501
  (net::ERR_INSECURE_RESPONSE) error, but it works when deployed (you
  get the warning and you can click continue). In Firefox it does not
  work. The page is displayed but it seems like no javascript is
  rendered, you can see only the css background. I assume this is
  because of the ssl because it's working if I use a random http url
  (not https). Is there something I can do for this?

  The fact that it displays a warning before you can continue is not
  really bothering me, because on real production we can use a paid ssl
  certificate.

  Is there another way I can include the first application into the
  second? The problem is that it is an entirely different application,
  with a different entry point and HTML structure, that's why I tried to
  use an iframe.

  Any help would be greatly appreciated.

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



Drag and Drop to a RichTextArea / IFrame?

2011-10-26 Thread Derek
I'm trying out some of the fun drag-and-drop stuff in GWT. My current
attempt is to drag a file into a richtextarea, but nothing seems to be
working correctly. It works fine if I use a FlowPanel or some other
GWT widget, but not a RichTextArea despite it have an addDropHandler
method.

Anyone have any experience with this?

My code in onModuleLoad:

DropHandler drop = new DropHandler() {

@Override
public void onDrop(DropEvent event) {
event.preventDefault();

String data = event.getData(text);
GWT.log(text is +data+ and there are
+numFiles(event.getDataTransfer())+ files);
}
};
RichTextArea rt = new RichTextArea();
rt.addDropHandler(drop); // never called even after drag-and-dropping
a file on the rt
RootPanel.get().add(rt);

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



Instead of Adsense (can't iframe) I've setup a affiliate banner rotator. Example Demo and source inside...

2011-10-08 Thread Brandon Donnelson
Since I can't stick Adsense in an iframe, I've been trying out Plan 
B, affiliate banner rotator inside an [iframe] with serialized loading so 
you don't get the same banner each time. 

Souce  demo and More on the wiki (in action here)- 
 http://code.google.com/p/gwt-examples/wiki/DemoAdvertisingAffiliate
Demo - http://affadpublish.appspot.com/adpublish - refresh to see the 
serialized loading

Brandon Donnelson
If I can do it, I'm sure you can do it 10x better :)
http://gwt-examples.googlecode.com


-- 
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/-/gqMPS-MErisJ.
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: iframe with GWT

2011-10-05 Thread CSchulz
Yeah, I know about the Frame element but I don't know how to edit the head 
and body areas inside of it or pass it HTML to fill itself with.

-- 
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/-/v3hQkcze3VwJ.
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: iframe with GWT

2011-10-05 Thread CSchulz
So I found this 
link http://bealetech.com/blogs/sean/2010/01/embedding-html-document-iframe-gwt 
and I got it to work using these functions: 

final IFrameElement iframe = Document.get().createIFrameElement();
FlowPanel innerBox = new FlowPanel() {
@Override
protected void onLoad() {
super.onLoad();
 
// Fill the IFrame with the content html
fillIframe(iframe, contentHtml);
 
// Add a HEAD element to the IFrame with the appropriate CSS
addHeadElement(iframe, cssUrl);
}};
innerBox.getElement().appendChild(iframe);


*and *


private final native void fillIframe(IFrameElement iframe, String content) /*-{
  var doc = iframe.document;
 
  if(iframe.contentDocument)
doc = iframe.contentDocument; // For NS6
  else if(iframe.contentWindow)
doc = iframe.contentWindow.document; // For IE5.5 and IE6
 
   // Put the content in the iframe
  doc.open();
  doc.writeln(content);
  doc.close();
}-*/;



I tried to get the head function on that page to work, but wasn't sure how to 
pass in the HTML and write it to the head element. Right now I'm just using 
div style=background-color:red; font-size: 18px;Hello World/div to get 
the styles to work with the divs I need them to. 

I end up with this in the dom:

diviframehtmlhead/headbodydiv 
style=position:fixed;top:0px;left:0px;color:red;background-color: blue; 
font-size:44px;Hello World/div/body/html/iframe/div

It works but I would imagine there's a better 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/-/Umjuy8C7iPgJ.
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: iframe with GWT

2011-10-05 Thread Tomasz Gawel
and the example without a line of JSNI :)
but be aware of same-domain restriction when retrieving reference
iframe's content.

public class IframeStyleExample implements EntryPoint {

public static StyleElement addStyleSheet(FrameElement frameElement,
String cssText) {

Document contentDocument = frameElement.getContentDocument();
Element targetElement = 
contentDocument.getElementsByTagName(head)
.getItem(0);

if(targetElement == null){
targetElement = contentDocument.getDocumentElement()
.getFirstChildElement();

if(targetElement == null){
contentDocument.insertFirst(targetElement = 
contentDocument
.createElement(head));
}
}

StyleElement styleElement = 
contentDocument.createStyleElement();
styleElement.setType(text/css);
styleElement.setCssText(cssText);

targetElement.insertFirst(styleElement);

return styleElement;
}

@Override
public void onModuleLoad() {

final Frame frame = new Frame();

frame.addLoadHandler(new LoadHandler() {

@Override
public void onLoad(LoadEvent event) {
FrameElement frameElement = 
frame.getElement().cast();
addStyleSheet(frameElement,
div {background: #ff;});

}
});

}

}

-- 
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-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: iframe with GWT

2011-10-05 Thread CSchulz
Thanks! This looks awesome! I'll give it a try. I never would've understood 
enough on how GWT interacts with the DOM to do this myself, but this'll be a 
very educational exercise for me. Thanks again!

-- 
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/-/TRmeYwcG8acJ.
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.



iframe with GWT

2011-10-04 Thread CSchulz
I'm wondering how I can create and iframe with GWT and inject some
style type=text/css body{background-color: red;} /style type
of stuff into the head and then inject a bunch of divs into the body.
I don't need to be able to link to them at all or apply any handlers,
so I would think this would be pretty easy, but I haven't found any
good ways to do this yet. I tried using an HTML object and injecting
iframe code into but it wasn't taking it for some reason. Any advice
is appreciated.

Thanks!

Cory

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



Popup Panels are always displayed behind the youtube iframe

2011-09-19 Thread erebrus
Hi,
I have HTMLPanel in which I include an iframe with a youtube. My
problem is that whenever I display a popup panel (e.g. custom made
dialog boxes) that youtube iframe is always displayed on top of the
popup panel?
Does anybody know how to solve this problem?

Thanks

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



what is the usage of iframe:__gwt_historyFrame ?

2011-09-19 Thread wahaha
in my host page,if there is no iframe which id is __gwt_historyFrame,i
also can make the application to support history.
why there must be a iframe?

-- 
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-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: Popup Panels are always displayed behind the youtube iframe

2011-09-19 Thread KevMo
Try adding wmode=Opaque to the end of the iFrame URL.

On Sep 19, 1:16 am, erebrus ereb...@gmail.com wrote:
 Hi,
 I have HTMLPanel in which I include an iframe with a youtube. My
 problem is that whenever I display a popup panel (e.g. custom made
 dialog boxes) that youtube iframe is always displayed on top of the
 popup panel?
 Does anybody know how to solve this problem?

 Thanks

-- 
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-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: what is the usage of iframe:__gwt_historyFrame ?

2011-09-19 Thread wahaha
anyone knows?

On Sep 19, 5:09 pm, wahaha il...@yahoo.com.cn wrote:
 in my host page,if there is no iframe which id is __gwt_historyFrame,i
 also can make the application to support history.
 why there must be a iframe?

-- 
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-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: what is the usage of iframe:__gwt_historyFrame ?

2011-09-19 Thread Thomas Broyer
This iframe is needed for IE6-7 support. If you don't need to support those, 
you can safely remove it.

-- 
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/-/I0LocXiOT1wJ.
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: Popup Panels are always displayed behind the youtube iframe

2011-09-19 Thread erebrus
Thanks, that did it.

On Sep 19, 2:47 pm, KevMo kevinps...@gmail.com wrote:
 Try adding wmode=Opaque to the end of the iFrame URL.

 On Sep 19, 1:16 am, erebrus ereb...@gmail.com wrote:







  Hi,
  I have HTMLPanel in which I include an iframe with a youtube. My
  problem is that whenever I display a popup panel (e.g. custom made
  dialog boxes) that youtube iframe is always displayed on top of the
  popup panel?
  Does anybody know how to solve this problem?

  Thanks

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



Iframe events

2011-09-01 Thread noach
I am using a native event previewer to detect if the user has pressed
certain keys. However, part of my interface contains an iframe
displaying another page. If the user has clicked inside the frame, key
presses events aren't previewed. Is there a way I can get the iframe
to foward events back to 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-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.



[gwt-contrib] Re: DirectInstallLinker should not immediately remove the script tag it has inserted into the IFRAME... (issue1454802)

2011-07-25 Thread fredsa

Committed in r10293

http://gwt-code-reviews.appspot.com/1454802/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


  1   2   3   4   >