cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
566
Views
0
Helpful
1
Replies

jabberwerx.js error when included in gadget. Integrating Cisco jabberUIDemo

andysteel
Level 1
Level 1

I'm trying to create a Finesse gadget that takes the Cisco Jabber UI Demo application (see link below), but am having real problems with the jabberwerx.js file when the gadget loads.

Cisco DevNet: SDK Web SDK - IM and Presence How To - Use Jabber IM UI Components

The error is at gadget load and is in the line below (prettified using Chrome). It appears that the line highlighted is failing and returns null into p. The line after that doesn't check for null and tries to use p.substring() which throws an exception.

version: '2014.04.0',

        _getInstallPath: function() {

            var p = this._config.installPath;

            if (!p) {

                var target = String(arguments[0] || "jabberwerx") + ".js";

====>      p = jabberwerx.$("script[src$='" + target + "']").slice(0, 1).attr("src");

                p = p.substring(0, p.indexOf(target));

            }

            return p.charAt(p.length - 1) == '/' ? p : p + '/';

        },

I think the problem is that the jabberwerx code is looking for a <script src="jabberwerx.js"> tag which it can't find, possibly due to the way finesse groups all the gadget files together somehow.

The self-same file works fine when run directly in the browser as opposed to being embedded into a gadget. Is there a special way to include jabberwerx and it's other files into Finesse ? Is there a way, similar to how Finesse.js is loaded such as desktop/assets/js/finesse.js ?

I've tried hosting the gadget, including jabberwerx, on the Finesse server and also separately on an Apache instance - it doesn't work in either scenario.

Any help appreciated.

1 Reply 1

dekwan
Cisco Employee
Cisco Employee

Hi Andy,

I will have to take a look at this and try to reproduce it. I think there might be a conflict since the Finesse container also uses jabberwerx. Finesse does not expose the jabberwerx.js file like it does for the finesse.js and the jquery.js.

Thanx,

Denise