Cannot load a mashup asynchronously based on an event or a flag
Ensure that you can successfully load a mashup asynchronously based on an event or a flag.
Condition
The mashup does not load when you try to load the mashup asynchronously based on an event, or depending on a flag.
Solution
Put a debugger in the
_initAllPegaObjects
method defined inPegaCompositeGadgetMgr.js
.If the debugger does not pause, you can explicitly invoke the method when you insert the mashup <div> snippet into the HTML. Use the following
_initAllPegaObjects
method definition:function _initAllPegaObjects() { if(pega && pega.web && pega.web.isWebMashup){ if (!bPegaIacInitialOnLoad) { pega.web.mgr._updateGadgets(); return; } bPegaIacInitialOnLoad = false; pega.web.mgr._initLog(); pega.web.mgr._logMsg("info", "", "Manager", "Started Pega IAC manager initialization."); /*BUG-270078 Logic to detect cookie enabled or not*/ pega.web.mgr._ut._setCookie("PegaIAC", "IACtest", 1); if (pega.web.mgr._ut._readCookie("PegaIAC") != "IACtest") { pega.web.mgr.cookiesDisabled = true; // cookies are disabled pega.web.mgr._logMsg("error", "", "Manager", "error: Browser cookies must be enabled for Pega IAC to function."); } pega.ctx.bEncryptURLs = false; pega.web.mgr._initGadgets(window); bPegaIacGadgetsInitialized = true; return; } <script src ='http://sample.pega.com/prweb?pyActivity=pzIncludeMashupScripts'></script>
Previous topic Cannot load the same mashup again based on conditions Next topic Cannot load a mashup from a non-default access group