<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WidgetManager.js references in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077233#M14579</link>
    <description>&lt;P&gt;Ok thank you I will give that a go!&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jul 2021 14:19:03 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2021-07-09T14:19:03Z</dc:date>
    <item>
      <title>WidgetManager.js references</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077206#M14573</link>
      <description>&lt;P&gt;WABDev 1.19&lt;/P&gt;&lt;P&gt;Theme: Launchpad&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for how WAB refers to the WidgetManager.js file when a page is initially loaded.&amp;nbsp; Is there a specific .html file that refers to it like,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;script src="WidgetManager.js" &amp;gt;&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any info!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 13:22:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077206#M14573</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-07-09T13:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: WidgetManager.js references</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077211#M14574</link>
      <description>&lt;P&gt;That js file is loader inside the configLoader.js, configManager.js, main.js, etc&amp;nbsp; files. There is not a script tag that loads it.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 13:31:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077211#M14574</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-07-09T13:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: WidgetManager.js references</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077213#M14575</link>
      <description>&lt;P&gt;In the index.html file there are script tags that call the init.js file that loads most of the WAB js files.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 13:35:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077213#M14575</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-07-09T13:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: WidgetManager.js references</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077214#M14576</link>
      <description>&lt;P&gt;I see.&amp;nbsp; The issue I have is I included a bit of code in the WidgetManager.js to attempt to deal with caching.&amp;nbsp; Anytime I redeploy a WAB with custom widgets this cache issue rears its head and telling users to clear browser cache or use incognito window (both work) is not an acceptable solution.&lt;/P&gt;&lt;P&gt;I updated the _tryLoadWidgetConfig function in the WidgetManager.js with this,&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;_tryLoadWidgetConfig: function (setting) {
        var def = new Deferred();
        //need load config first, because the template may be use the config data  
        if (setting.config &amp;amp;&amp;amp; lang.isObject(setting.config)) {
            //if widget is configurated in the app config.json, the i18n has beed rocessed  
            def.resolve(setting.config);
            return def;
        } else if (setting.config) {
            if (require.cache['url:' + setting.config]) {
                def.resolve(json.parse(require.cache['url:' + setting.config]));
                return def;
            }
            var configFile = utils.processUrlInAppConfig(setting.config);
            // The widgetConfig filename is dependent on widget label,  
            // IE8 &amp;amp; IE9 do not encode automatically while attempt to request file.  
            var configFileArray = configFile.split('/');
            configFileArray[configFileArray.length - 1] =
            encodeURIComponent(configFileArray[configFileArray.length - 1]);
            configFile = configFileArray.join('/');
            //Append date to ensure you get the latest json file  
            configFile += "?currentVersion=" + Date.now();
            return xhr(configFile, {
                handleAs: "json",
                headers: {
                    "X-Requested-With": null
                }
            });
        } else {
            return this._tryLoadResource(setting, 'config').then(function (config) {
                //this property is used in map config plugin  
                setting.isDefaultConfig = true;
                return config;
            });
        }
    },&lt;/LI-CODE&gt;&lt;P&gt;However, the WidgetManager.js file itself is being cached.&amp;nbsp; So I hoped to apply something to whatever loaded this to force a new version to be loaded each time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 13:37:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077214#M14576</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-07-09T13:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: WidgetManager.js references</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077220#M14577</link>
      <description>&lt;P&gt;So if you look at the source tab and search for WidgetManager.js file (after loading your WAB app) you will see "WidgetManager.js?wab_dv=2.20" so the easy way to manage no caching is to change the "&lt;SPAN&gt;deployVersion&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'2.20'&lt;/SPAN&gt;&lt;SPAN&gt;;" in the env.js file each time you make some code changes. For example&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;deployVersion&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'2.20.070921'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Jul 2021 14:01:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077220#M14577</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-07-09T14:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: WidgetManager.js references</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077233#M14579</link>
      <description>&lt;P&gt;Ok thank you I will give that a go!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 14:19:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077233#M14579</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-07-09T14:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: WidgetManager.js references</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077331#M14581</link>
      <description>&lt;P&gt;I took one of our dev WABs with custom widgets and updated the env.js file line #83 with your suggestion:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;deployVersion = '2.19.20210709';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added the Bookmarks widget to the WAB app, redeployed it and navigated to the app and this is what shows when it opens:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesCrandall_0-1625848680635.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/18116i4FFB01B3A86065FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamesCrandall_0-1625848680635.png" alt="JamesCrandall_0-1625848680635.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inspecting the env.js that got loaded, line 83 shows the cached version not what I changed it to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use incognito browser window (Chrome) it opens just fine with the Bookmarks widget!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 16:43:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077331#M14581</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-07-09T16:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: WidgetManager.js references</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077343#M14582</link>
      <description>&lt;P&gt;I then tried to update the index.html with this,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;script type="text/javascript" src="env.js?1"&amp;gt;&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Which seemed to do something!&amp;nbsp; I can see the Bookmarks widget and I didn't get the error as before but now the WAB loads weird like top of the page is split.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesCrandall_1-1625849922381.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/18119i93FCA041CA791215/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamesCrandall_1-1625849922381.png" alt="JamesCrandall_1-1625849922381.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 16:57:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077343#M14582</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-07-09T16:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: WidgetManager.js references</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077985#M14587</link>
      <description>&lt;P&gt;Robert this looks like it will be the winner on this issue.&amp;nbsp; I had a strange result when I tested but since I redeployed again the initial testing is promising and just need users to validate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the tips.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 19:26:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/widgetmanager-js-references/m-p/1077985#M14587</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-07-12T19:26:14Z</dc:date>
    </item>
  </channel>
</rss>

