I am also experiencing a very similar problem, though with a few
differences.  It consistently occurs with users behind a corporate
firewall using IE6 on the first page load when IE has an empty cache.
Refreshing the page works and as long as the cache isn't cleared, all
subsequent page loads work.  I have been unable to duplicate the
problem in a development environment setting up test proxies and
firewalls so I am not sure what it is about the environment, but it
has occured at multiple companies.   I am unable to try IE7 or any
other browser at those companies so I am not sure if this strictly an
IE6 issue or not.  I verifed from the server logs that all the right
files are being fetched and did a similar trick to what Steve
described to verify that onModuleLoad() is not being called.  If I add
some javascript to reload the page when it detects that onModuleLoad()
has not been called, then it works but that feels too hacky for
production.  Other than upgrading to 1.6 (I am also on 1.5.3), any
suggestions?  Thanks.

- Joel


On May 15, 3:17 pm, Joel Webber <[email protected]> wrote:
> Steve,
> I can't seem to reproduce the problem on my end, but for what it's worth,
> latching with a timeout like that is going to be pretty brittle in practice.
> Here's an alternative formulation that won't be flaky:
>
> HTML:
>
>   <script>
>
>   function onGwtAppLoaded() {
>
>     alert("w00t!");
>
>   }
>
>   </script>
>
> Java:
>
>   public void onModuleLoad() {
>
>     setLoaded();
>
>   }
>
>   public native void setLoaded() /*-{
>
>     if ($wnd.onGwtAppLoaded) {
>
>       $wnd.onGwtAppLoaded();
>
>     }
>
>   }-*/;
>
> This works because the GWT linkers all make the guarantee that
> onModuleLoad() will not be called until the DOM is "ready" (i.e. all the DOM
> elements, including the body, are fully-evaluated, including scripts). So
> there's no chance that onGwtAppLoaded() will *not* be defined when
> onModuleLoad() is called.
>
> Hope this helps,
> joel.
>
> On Thu, May 14, 2009 at 12:38 PM, Steve M <[email protected]> wrote:
>
> > Hi,
>
> > I am seeing a problem in Internet Explorer whereby it appears that
> > onModeulLoad() does not get called.
>
> > In the HTML ive added the following to highlight the problem...
>
> > <script>
> > var t=setTimeout("testLoaded()",30000);
>
> > function testLoaded()
> > {
> >    if (window.Loaded==undefined)
> >    {
> >        alert("onload didnt run");
> >    }
> > }
>
> > </script>
>
> > My GWT code...
>
> >    public void onModuleLoad()
> >    {
> >        setLoaded();
>
> >        ... now initialise the GWT
> >    }
>
> >    public native void setLoaded()
> >    /*-{
> >          $wnd.Loaded = "loaded";
> >    }-*/;
>
> > Intermitently using Internet Explorer, it simply fails to call the
> > onModuleLoad() method, and you get the "onload didnt run" method.
>
> > Any ideas on this one? Seems quite a serious flaw.
>
> > GWT version: 1.5.3
> > IE: 7.0.5730.11IC
>
> > thanks, Steve M
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to