IBM RTC ccm work item java script, how detect or know when WI was created via OSLC vs Web interface
One answer
The Work Item Proxy class is only available in the web client, and the same for the dojo libraries.
You can set up your JavaScript to check for either of these in order to work out if you're in the Web Client or somewhere else. Something like this should work:
if (typeof dojo.xhrGet === 'undefined') {
console.log('We are not in the Web client any more, Toto');
} else {
console.log('My spider senses are tingling! We are in the Web client');
}
Comments
hi it works when you trigger a custom attribute I mean when you put as dependent a custom attribute, but you but a dependent attribute that is non custom it doesn't work, is there any other way we can know?
Thank for all your help Davyd
What do you mean "it doesn't work" - can you state exactly what is happening?
Remember that if the code above is run on the server, you won't see anything in the web browser console (because it's running on the server!) - you'll see the message in the server logs instead.