I would like to point to http://jajatips.blogspot.com/2010/11/share-smartgwt-js-over-several-gwt.html where there is a method that works, but isn´t really optimal because it copies theme styles and other resources several times to all the modules. This is just an improvement to that approach.
Create a base GWT Module:
BaseGWTModule.gwt.xml
<module rename-to="basegwt"> <inherits name='com.google.gwt.user.User'/> <inherits name='com.smartgwt.SmartGwtNoSmartClient'/> </module>
Create a module for only serving smartgwt /sc folder:
SmartGWTResourcesModule.gwt.xml
<module rename-to='smartgwt'> <inherits name='com.smartgwt.SmartGwt'/> </module>
Create several modules like this one:
SmartGWTSampleModule.gwt.xml
<module rename-to="gwtmodule"> <inherits name='com.kprtech.gwt.BaseGWTModule'/> <entry-point class='com.example.EntryPoint'/> </module>
Then in the html use something like:
index.jsp
<script type="text/javascript" language="javascript" src="gwtmodule/gwtmodule.nocache.js"></script> <script> var isomorphicDir = "smartgwt/sc/"; </script>
Thanks, that actually help me with my multiple modules. But I had to load resources module as well to make it work… I.e. index.jsp looks like this:
[CODE]
var isomorphicDir = “smartgwt/sc/”;
[/CODE]
var isomorphicDir = "smartgwt/sc/";
sorry can’t post the code snippet ( So here is what I did:
http://pastebin.com/qpY20ABs