Thanks for the reply, although this also seems to work fine in Development
mode, but not when Deployed and running via Tomcat.
On Thursday, June 14, 2012 10:51:09 AM UTC-4, Paul Stockley wrote:
>
> You can use some JSNI to do this. Create a method such as
>
> protected native void reloadIFrame(Element iframeEl) /*-{
> iframeEl.contentWindow.location.reload(true);
> }-*/;
>
> Then call it with your iFrame element
>
> On Thursday, June 14, 2012 10:17:26 AM UTC-4, Thomas Mancini wrote:
>>
>> All,
>>
>> I am currently working on a GWT project where I am displaying an HTML
>> file within an iframe in my application. This HTML file is actually being
>> written to as it is getting displayed, and I am hoping to be able to reload
>> the frame so that the changes made to the HTML file are reflected on
>> screen. I am able to do this two different ways that both work when
>> running in development mode, however neither seem to work when the project
>> is deployed.
>>
>> The first method I tried was setting the frame's URL to itself:
>> frame.setUrl(frame.getUrl());
>>
>> The second method I tried using JSNI:
>>
>> public native void refresh() /*-{
>> if($doc.getElementById('__reportFrame') != null) {
>> $doc.getElementById('__reportFrame').src =
>> $doc.getElementById('__reportFrame').src;
>> }
>> }-*/;
>>
>> When deployed, the frame gets displayed in a Window, and when the file is
>> finished being written to, a call to either of these refresh methods is
>> made, and the frame refreshes to contain the finished HTML file. When I am
>> deployed, the call to the refresh does not reload the contents of the
>> frame, however if I bring up the frame's context menu (in Firefox), then go
>> into This Frame, and click reload, it successfully reloads the frame to
>> contain the finished HTML file. I have tested this on multiple versions of
>> Firefox without any luck.
>>
>> Does anyone have any suggestions? Why would the behavior be different
>> from one mode to the other?
>>
>> 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/-/CFNd5_oc2_YJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.