• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[SOLVED] Valence Fron End Variables?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Valence Fron End Variables?

    Are the front end Valence "global" variables documented anywhere? For instance, I have used sessionStorage.sid before when doing something like this:

    Ext.core.DomHelper.append(document.body, {
    tag: 'iframe',
    frameBorder: 0,
    width: 0,
    height: 0,
    src: 'vvcall.pgm?sid=' + sessionStorage.sid + '&app=' + Ext.getUrlParam('app').............

    (I only knew about that one because Sean told me how to do it)

    Since there is a variable named sessionStorage.sid and the app id can be retrieved by doing Ext.getUrlParam (which I can't find where that came from; don't see it in the API docs), I figure there may be more. For example the session user id that logged in.

    I was wondering if that is available anywhere on the front end rather than having to go to the back end to get it.

  • #2
    [SOLVED] Valence Front End Variables?

    The code you have for the download is documented in Valence 3.2 as Valence.util.download

    The sid and app are added to the vvcall.pgm Ajax calls before each request automatically. Those are the only extra params added.

    The next update of Valence 3.2 will have two new methods Valence.util.getUserName() that will return the name of the logged in user and Valence.util.getEnvironment() that returns the Environment description. These will be added to the API documentation. The getUserName() method runs the function below to return the user logged in. You can use the same code now:
    Code:
    function () {
        return parent.Portal.config.Runtime.userName;
    }

    Comment

    Working...
    X