I don't think you can do that... bringing in a common pre-compiled-js module. That would be pretty cool.
If your two sites are not that big, then you could compile them into one app, and then decide which widget(s) to show based on the URL in the onModuleLoad. Or perhaps you could try communicating between the modules using JSON, with the built-in GWT JSON library. On Feb 14, 6:48 pm, Allyn <allyn.h...@gmail.com> wrote: > We have the following setup: > > Two GWT-based web pages, built separately but hosted on the same web > server and used side-by-side in iframes in the same browser window/ > tab. The two web pages both include a common module that defines > common data model objects (i.e.POJOs). Instances of these objects are > sent from one of the pages to the other via JavaScript. > > While each projects is using the same shared GWT module for the common > data model classes, each appears to use different class IDs behind the > scenes when GWT builds it into JavaScript for each web page project. > These IDs are what are used to map from raw JS objects to the GWT > classes. Unfortunately, since each project is creating different IDs > for the same classes, it cannot properly cast an instance of a class > received from the other web page. > > Is there any way to compile the common module once and include the > compiled JavaScript in both other projects, rather than including the > raw Java code and compiling it two different times, to ensure that the > class template mapping metadata is the same across web pages? > > I realize this is an odd (and probably not recommended) setup, but it > is a requirement from the customer for reasons I won't go into here. -- 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.