[ 
https://issues.apache.org/jira/browse/SHINDIG-1994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Doug Davies updated SHINDIG-1994:
---------------------------------
    Description: 
This has to do with the MODULE_ID renderParam.

If I do the following:
{code}
var renderParams = {};
renderParams[osapi.container.RenderParam.MODULE_ID] = 1;
container.navigateGadget(gadgetSite, gadgetXml, {}, renderParams, function(){
    // log active site immediately (undefined)
    console.log("activeSiteHolder1=" + gadgetSite.getActiveSiteHolder());
    // log active site 1 second later (now has a value)
    setTimeout(function() {
        console.log("activeSiteHolder2=" + gadgetSite.getActiveSiteHolder());
    }, 1000);
});
{code}

activeSiteHolder is undefined on the first getter (even though I’m in the 
callback function).  If I removed the 2nd line and not set the MODULE_ID render 
param then it works.

  was:
This has to do with the MODULE_ID renderParam.

If I do the following:
var renderParams = {};
renderParams[osapi.container.RenderParam.MODULE_ID] = 1;
container.navigateGadget(gadgetSite, gadgetXml, {}, renderParams, function(){
    // log active site immediately (undefined)
    console.log("activeSiteHolder1=" + gadgetSite.getActiveSiteHolder());
    // log active site 1 second later (now has a value)
    setTimeout(function() {
        console.log("activeSiteHolder2=" + gadgetSite.getActiveSiteHolder());
    }, 1000);
});

activeSiteHolder is undefined on the first getter (even though I’m in the 
callback function).  If I removed the 2nd line and not set the MODULE_ID render 
param then it works.


> The activeSiteHolder is undefined if called too soon after navigateGadget
> -------------------------------------------------------------------------
>
>                 Key: SHINDIG-1994
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1994
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>    Affects Versions: 2.5.2
>            Reporter: Doug Davies
>
> This has to do with the MODULE_ID renderParam.
> If I do the following:
> {code}
> var renderParams = {};
> renderParams[osapi.container.RenderParam.MODULE_ID] = 1;
> container.navigateGadget(gadgetSite, gadgetXml, {}, renderParams, function(){
>     // log active site immediately (undefined)
>     console.log("activeSiteHolder1=" + gadgetSite.getActiveSiteHolder());
>     // log active site 1 second later (now has a value)
>     setTimeout(function() {
>         console.log("activeSiteHolder2=" + gadgetSite.getActiveSiteHolder());
>     }, 1000);
> });
> {code}
> activeSiteHolder is undefined on the first getter (even though I’m in the 
> callback function).  If I removed the 2nd line and not set the MODULE_ID 
> render param then it works.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to