I have existing javascript in a project that creates a 'Calendar' object. The object is a member of window
.
When I added smartgwt to my project, the original Calendar object was overwritten by a smartclient calendar (ISC_Calendar) packaged in smartgwt.
Using a browser-based JS debugger, I found that all the JS objects from smartgwt were contained both in window
and in window.isc
. I definitely don't want them all at window level because many of them have generic names like Calendar.
The offending file in my case is ISC_Calendar.js, which ends up in war/<projectname>/sc/modules after a gwt compile. It calls the following line: isc.ClassFactory.defineClass("Calendar","Canvas","DataBoundComponent");
GWT compiled location: war/projectname/sc/modules/ISC_Calendar.js
Jar location: com.smartclient public/sc/modules/ISC_Calendar.js
Src location: can't find it
I suppose I can just change the javascript file in the jar I'm using, but that doesn't really solve the larger problem. I don't want to worry about running into namespace issues down the road