<?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 Method to detect opening of an application widget from a second widget in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11493#M295</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm developing an enhanced Google Analytics widget, one that tracks specific layer interactions, map interactions, etc. etc. &amp;nbsp;I'm curious if there is a way to code the Google Analytics widget to detect and track when a user opens any other (or chosen subset) of application widgets. &amp;nbsp;Given the Google Analytics widget essentially is always running, can I include code in its Widget.js that listens for the creation, opening, or instantiation of other widgets in the application. &amp;nbsp;I looked in the widget manager class, but am unsure if widgets have access to each other (because it makes sense if they are compartmentalized).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jul 2017 19:54:24 GMT</pubDate>
    <dc:creator>Jay_Gregory</dc:creator>
    <dc:date>2017-07-26T19:54:24Z</dc:date>
    <item>
      <title>Method to detect opening of an application widget from a second widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11493#M295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm developing an enhanced Google Analytics widget, one that tracks specific layer interactions, map interactions, etc. etc. &amp;nbsp;I'm curious if there is a way to code the Google Analytics widget to detect and track when a user opens any other (or chosen subset) of application widgets. &amp;nbsp;Given the Google Analytics widget essentially is always running, can I include code in its Widget.js that listens for the creation, opening, or instantiation of other widgets in the application. &amp;nbsp;I looked in the widget manager class, but am unsure if widgets have access to each other (because it makes sense if they are compartmentalized).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 19:54:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11493#M295</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2017-07-26T19:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Method to detect opening of an application widget from a second widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11494#M296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Sure you can. The WidgetManager class publishes the topic 'openWidget' and&amp;nbsp;'widgetCreated' and&amp;nbsp;'widgetActived' that you can subscribe to in your widget.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 20:08:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11494#M296</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-07-26T20:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Method to detect opening of an application widget from a second widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11495#M297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, thanks - now that I'm looking at the WidgetManagerClass, I see a triggerWidgetOpen function that publishes an openWidget topic. &amp;nbsp;However, I didn't find any information about that in the documentation. &amp;nbsp;I might need a little help with the code here - supposed I have a widget in my application called "LayerList", and I want to set an event listener in some other widget that triggers when LayerList is opened. &amp;nbsp;I'm unclear what the code would look like.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var widgetManager = WidgetManager.getInstance()&lt;/P&gt;&lt;P&gt;on.widgetManager.triggerWidgetOpen("LayerList")('openWidget', function(a){&lt;/P&gt;&lt;P&gt;do some stuff;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that's not correct - I'm just not sure how these topics and methods should be used. &amp;nbsp;Any advice would be very helpful. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 20:28:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11495#M297</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2017-07-26T20:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Method to detect opening of an application widget from a second widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11496#M298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, you would just subscribe to the openWidget topic in your widget&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;topic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;subscribe&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'openWidget'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="comment token"&gt;//do something&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:29:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11496#M298</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T20:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Method to detect opening of an application widget from a second widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11497#M299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But what I want to do is subscribe to the opening of any widget from my Google Analytics widget. &amp;nbsp;So something like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; myWidgetNames &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"LayerList"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"AttributeTable"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Legend"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Draw"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;myWidgetNames&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lenth&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator token"&gt;++&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; widget &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; WidgetManager&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getInstance&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getWidget&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;widgetName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; widget&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;topic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;subscribe&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'openWidget'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;widetName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GoogleAnalytics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'widgetOpen'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; widgetName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Does that make sense? &amp;nbsp;I want to detect the opening of any widget in the application from the source code of a single widget in the application...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11497#M299</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2021-12-10T20:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Method to detect opening of an application widget from a second widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11498#M300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Topic is a dojo class that does not need to be tied to a specific widget for just use the code I posted and it will listen for all widget opens in the app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 14:12:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11498#M300</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-07-27T14:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Method to detect opening of an application widget from a second widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11499#M301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh, thanks again. &amp;nbsp;So I couldn't get it to work with 'openWidget' but I could get an event to fire with 'widgetActived'. &amp;nbsp;It's interesting - the callback only occurs if the user clicks within the widget panel itself (as if to begin using the widget). &amp;nbsp;Just clicking the on screen widget button that displays the panel doesn't trigger the callback itself - the user must click inside the widget and begin actually using it. &amp;nbsp;It's not intuitive, but for my purposes it's actually more useful. &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 15:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11499#M301</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2017-07-27T15:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Method to detect opening of an application widget from a second widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11500#M302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Turns out I can not get the openWidget topic to fire either but widgetCreated and widgetActived both work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 15:59:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/method-to-detect-opening-of-an-application-widget/m-p/11500#M302</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-07-27T15:59:57Z</dc:date>
    </item>
  </channel>
</rss>

