Reply to Message

View discussion in a popup

Replying to:
sagarsavairam
Contributor
Contributor

Hi Denis, Thanks for the response,

we are using WEB-PLATFROM.getUserSession() in 6.7 SDK, It returns all the available sever info where we find the parameters like (serviceGuid,sessionId,serviceUrl,locale) but we are unable to get(objectId, actionUid, targets)which are not in userSession.

As you specify in previous comment, we saw at the "globalview sample" from 6.5U1 SDK but unabe to understand how to get(objectId, actionUid, targets) these parameters.

Is there any way to get(objectId, actionUid, targets) these parameters specifically with 6.7 SDK?

Please see the code snipplet in web-platform.js for reference. where we are able to get (serviceGuid,sessionId,serviceUrl,locale) with WEB-PLATFROM.getUserSession() but unable to proceed for (objectId, actionUid, targets)

// Get a parameter value from the current document URL

function getURLParameter(name) {
return (new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [,""])[1].replace(/\+/g, '%20') || null;
}

// Get the current context object id or return null if none is defined
WEB_PLATFORM.getObjectId = function() {
return getURLParameter("objectId");
};

// Get the current action Uid or return null if none is defined
WEB_PLATFORM.getActionUid = function() {
return getURLParameter("actionUid");
};

// Get the comma-separated list of object ids for an action, or null for a global action
WEB_PLATFORM.getActionTargets = function() {
return getURLParameter("targets");
};

// Get the current locale
WEB_PLATFORM.getLocale = function() {
return WEB_PLATFORM.getUserSession().locale;
};

// Get the info provided in a global view using a vCenter selector

WEB_PLATFORM.getVcSelectorInfo = function() {
var server = WEB_PLATFORM.getUserSession().serversInfo;
var info = { serviceGuid: server[0].serviceGuid;,
              sessionId: server[0].serviceGuid;,
              serviceUrl: server[0].serviceGuid;};
return info;
};

Reply
0 Kudos