Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1994

The activeSiteHolder is undefined if called too soon after navigateGadget

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.2
    • 2.5.3
    • Javascript
    • None

    Description

      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.

      Attachments

        Activity

          People

            csddavies Doug Davies
            csddavies Doug Davies
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: