Friday, July 27, 2012

Loading a GWT module after page load

Hi all,

I'm looking to migrate our app to GWT 2.4 over a few releases.  As part of this, we're building some new components in GWT 2.4 and integrating them into Tapestry 5 (ugh, I know).  I've got the request factory stuff sorted, and we have some components working well when they're part of the page on load.

What seems challenging is incorporating GWT modules after the page has loaded.

Basic scenario:
  1. User arrives at a Tapestry page
  2. User clicks on a Tapestry link that uses Tapestry Zones to pull in a tapestry component that is basically a gwt html placeholder
What's happening is that the html and necessary scripts are added to the page, but onmoduleload is never called.  The .nocache.js is executed, and I don't see any errors.  I'm trying to dig into this, but I'm a bit new to the "guts" of GWT.  A description of how this works and some spots where I might stick some js breakpoints in order to sort all this out would be very helpful.

I've googled this a bit and landed on some threads in this forum from 2 or more years ago, e.g. https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/J5NfMDJyIM8 but all the linker documentation i can find looks old (GWT 1.5 or earlier), and I'm not getting blanked pages as the thread indicates.

It's possible Tapestry's zone ajax functionality is loading things out of order as compared to what GWT needs/expects (e.g. must html elements be present in page before script executes? etc...).

Any insights into this would be hugely helpful.

Thanks,
Taylor

--
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/-/B0eCcHuIRyAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment