Use of multiple GWT modules in an application

614 views
Skip to first unread message

Denero

unread,
Oct 11, 2012, 9:32:54 AM10/11/12
to Google-We...@googlegroups.com
Hi,
I have a GWT application which uses a JavaScript library published on a remote
server and that also was developed under GWT and the APIs exposed over JSNI. I
do not have access to the source ocde of that. That library uses cross-site
scripting and uses xsiframe linker option.

My application which include that in a script node and calls its APIs works fine
in the production mode. But now for some debugging purpose in my application
when I run it in the dev mode, all the API calls to the other GWT library fails
because it looks like it also trying to run in dev mode as I see that
*.devmode.js of that is getting loaded and thus that module is not loaded
successfully(I do not see any errors either).

How can I run my application in dev mode while still keeping the other library
in production mode(ie just like any other native code)? As said, the other
library itself is hosted on a different server and when running our application
in devmode we specify only our module names, so I would expect it to work
bydefault. Is there a compiler or dev mode option that I can use here?

I am using GWT 2.4.0.

Thanks in advance,
dw


Thomas Broyer

unread,
Oct 11, 2012, 10:18:30 AM10/11/12
to google-we...@googlegroups.com, Google-We...@googlegroups.com, dener...@yahoo.com
It's actually (and fortunately) easy: change gwt.codesvr in your URL with gwt.codesvr.moduleName, where "moduleName" is your module name (the one in your gwt.xml's rename-to="")
That way, the third-party module won't try to run in DevMode, only your module that matches "moduleName".

Thad

unread,
Oct 11, 2012, 10:32:53 AM10/11/12
to google-we...@googlegroups.com, Google-We...@googlegroups.com, dener...@yahoo.com
Thomas, indulge my curiosity. I've not the situation that Denero describes, but I tried this anyway.

1) When I do this, my app loads much faster. Why?
2) Also, I don't see my app's client tab open in the DevMode window. Again, why?

Thanks.

Thomas Broyer

unread,
Oct 11, 2012, 10:36:31 AM10/11/12
to google-we...@googlegroups.com, Google-We...@googlegroups.com, dener...@yahoo.com


On Thursday, October 11, 2012 4:32:53 PM UTC+2, Thad wrote:
Thomas, indulge my curiosity. I've not the situation that Denero describes, but I tried this anyway.

1) When I do this, my app loads much faster. Why?
2) Also, I don't see my app's client tab open in the DevMode window. Again, why?

Hmm, does it really runs in DevMode then? (e.g., in Chrome is the toolbox appearing in the omnibar? or in any browser, is the devmode.js or hosted.html loaded? or a <md5>.cache.js/html?)

Denero

unread,
Oct 11, 2012, 11:39:24 AM10/11/12
to Google-We...@googlegroups.com
That works perfectly fine. Thanks Thomas.


Denero

unread,
Oct 11, 2012, 12:44:24 PM10/11/12
to Google-We...@googlegroups.com
Sorry, send it too fast.. The application works fine but I realize now that my
gwt module is now not running in devmode. It is not stopping at breakpoints.
Also, I do not see the message "[INFO] [clientsample] - Module clientsample has
been loaded" in the Development mode tab. Just remove .moduleName from the url,
it shows that.

Here is the URL that I tried:
http://127.0.0.1:8882/Sample.html?gwt.codesvr.clientsample=127.0.0.1:9997
where "clientsample" is the rename-to in my gwt.xml file.
Does it look right?

BTW I see that with just
http://127.0.0.1:8882/Sample.html?gwt.codesvr=127.0.0.1:9997,I get the error
message in the development tab for the other GWT module whihc is named "client":
[ERROR] [client] - Unable to find 'client.gwt.xml' on your classpath; could be a
typo, or maybe you forgot to include a classpath entry for source?

Thanks,
dw


Thad

unread,
Oct 11, 2012, 3:48:30 PM10/11/12
to google-we...@googlegroups.com, Google-We...@googlegroups.com, dener...@yahoo.com
Ah, I see.  It's not in DevMode and though it is running some stuff (from a earlier build?) it's incomplete. Thanks.

There are times that GWT reminds me of Clarke's 3rd Law. I love working with this toolkit.
Reply all
Reply to author
Forward
0 new messages