I'm trying to get SuperDevMode to work on GWT-2.6.1 with multiple modules.
I've came across an issue whereby the SuperDevMode plugin doesn't appear to pick up Modules that exist at different levels in the DOM. For example in the generated .nocache.js file has the following line :
var o=window;
This window includes a :
__gwt_activeModules
variable that contains the modules that exist within that page, so when the bookmarklet is activated it finds the relevant module and replaces it with the .nocache.js file running on the codeserver (I believe !)
However the problem occurs when I try and recompile a module that exists in a different level in the DOM - because the nocache.js window reference is different - the SuperDevMode plugin can only see the top-level module. Is this a limitation of the plugin or have I incorrectly configured something ?
Thanks.
If the SDM code server is running on the same ip as the web server then I suggest using the DevMode with the -war /path/to/war/output/dir/on/jboss so when the code server is launched it writes [module].nocache.js with sdm init in it to the war output directory. This means when it loads up it will compile and refresh compiles.
I prefer to use the code server launcher because it's easier to configure with external servers. The GWT Eclipse Plugin has a launcher for the code server, and instead of -war, it's call -launcherDir.
If the web server is on a different ip, either use proxy back to the code server is needed. This will route the 9867 request back to your local codeserver. Or hack and change the hostName in the [module].nocache.js. I'm working up a hack for this and will show how to run it at GWTCon. This wouldn't be needed if the server runtime were run from Eclipse because both the code server and web server are bound on the same ip.
Here is a video with a simple external web server on the same ip. The same effect can be had with any web server on the same ip. https://www.youtube.com/watch?v=HfucNtGXLYY