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

Embed web page gadget URL with user ID

Hi !

how can I extract user login ID and add it to the XML file in this function :

<script type="text/javascript">

                // initialize the gadget running the init handler defined in EmbeddedWebApp.js

                gadgets.HubSettings.onConnect = function () {

                    finesse.modules.EmbeddedWebAppGadget.init("http://webapp/ipcc/test.aspx?id="+user.getId());

                };

            </script>

1 Accepted Solution

Accepted Solutions

dekwan
Cisco Employee
Cisco Employee

Hi,

The user's id is in the finesse.gadget.Config. You cannot access the fields without initializing the ClientServices. If you do it in the .xml in the location you showed in your post, it would be something like this:

<script type="text/javascript">

     // initialize the gadget running the init handler defined in EmbeddedWebApp.js

     gadgets.HubSettings.onConnect = function () {

          var cfg = finesse.gadget.Config;

          finesse.clientservices.ClientServices.init(cfg, false);

          finesse.modules.EmbeddedWebAppGadget.init("http://webapp/ipcc/test.aspx?id=" + cfg.id);

     };

</script>

The other option is to pull the URL creation into the EmbeddedWebApp.js file itself and put the code in there (the code will be the same first two lines).

Thanx,

Denise

View solution in original post

1 Reply 1

dekwan
Cisco Employee
Cisco Employee

Hi,

The user's id is in the finesse.gadget.Config. You cannot access the fields without initializing the ClientServices. If you do it in the .xml in the location you showed in your post, it would be something like this:

<script type="text/javascript">

     // initialize the gadget running the init handler defined in EmbeddedWebApp.js

     gadgets.HubSettings.onConnect = function () {

          var cfg = finesse.gadget.Config;

          finesse.clientservices.ClientServices.init(cfg, false);

          finesse.modules.EmbeddedWebAppGadget.init("http://webapp/ipcc/test.aspx?id=" + cfg.id);

     };

</script>

The other option is to pull the URL creation into the EmbeddedWebApp.js file itself and put the code in there (the code will be the same first two lines).

Thanx,

Denise

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: