require an external dojo module not working when loaded from a javascript update site
Dear All,
we have written a extension for CCM and load this as an updatesite in CCM.
Registering and starting the update site is working. New functions like menu items and new buttons are available in CCM.
Where we have problem is with the Dojo "require" command if the module we request is NOT inside the update side deployed but on an external webserver (same IHS webserver than the jazz server is behind).
Following code is not working. There is no error message seen:
If I store the module inside the updatesite so it is loaded below the baseurl of Dojo, all is working.
I have also tried adding the URL to the whitelist of CCM, but this has not helped.
Any idea how I can bring Jazz-Dojo to load my external modules?
regards
Guido
we have written a extension for CCM and load this as an updatesite in CCM.
Registering and starting the update site is working. New functions like menu items and new buttons are available in CCM.
Where we have problem is with the Dojo "require" command if the module we request is NOT inside the update side deployed but on an external webserver (same IHS webserver than the jazz server is behind).
Following code is not working. There is no error message seen:
This is working if I run the whole stuff outside jazz. So Dojo do not have an issue with loading modules which are not stored under his baseurl but on a remote webserver.require(
{ packages: [
{ name: "popup"
location: "https://localhost/projects/randomgenerator",
main: "popup"
}
]
},
[ "popup" ],
function(Popup) {
var popup = new Popup();
popup.say();
}
);
If I store the module inside the updatesite so it is loaded below the baseurl of Dojo, all is working.
I have also tried adding the URL to the whitelist of CCM, but this has not helped.
Any idea how I can bring Jazz-Dojo to load my external modules?
regards
Guido
Comments
Jonas Studer
Apr 13 '15, 4:14 a.m.Hy Guido,
I also had a lot of trouble with loading external Modules (or loading old ones with AMD).
Maybe this might help.
When I require a module/js-script (notice, Jazz still uses Dojo 1.8.4)
"com.ibm.team.process.web.client.internal.ProcessClient",
I'm getting an error.
E.g. "Unresolved module with id: com.ibm.team.process.web.client.internal.ProcessClient"
But because, most of the Jazz scripts are written under Dojo 1.7 (Pre-AMD Code) it'll get some problems there but just in the console.
You'll get acces to your module through dojo.global
"dojo.global.com.ibm.team.process.web.client.internal.ProcessClient"
Hopefully this will help.
And if the Script is on anothe Server, Withelisting may also be an issue.