<?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 Track another widget's events in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/track-another-widget-s-events/m-p/788760#M3840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still fairly new to WAB, and dojo on the whole, so perhaps this has a simple answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take, for example, the out-of-the-box version 1.2 Search widget. Inside its .js file is the following few lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.own(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on(this.searchDijit, 'select-result', lang.hitch(this, '_onSelectResult'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if there's away to hitch on to this &lt;EM&gt;exact&lt;/EM&gt; same event from another custom non-panel widget. The desired behavior is that whenever the out-of-the-box Search widget's searchDigit fires its 'select-result' event, this other &lt;EM&gt;custom&lt;/EM&gt; widget can perform an action as well, using the same argument object that is passed to the local Search's event handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to avoid modifying the out-of-the-box Search widget's code, as it seems pretty tightly coupled to the WAB layout. Though if there are any best practices for this latter approach, I'm open to those as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Nov 2015 22:38:02 GMT</pubDate>
    <dc:creator>AnthonyPreston1</dc:creator>
    <dc:date>2015-11-10T22:38:02Z</dc:date>
    <item>
      <title>Track another widget's events</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/track-another-widget-s-events/m-p/788760#M3840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still fairly new to WAB, and dojo on the whole, so perhaps this has a simple answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take, for example, the out-of-the-box version 1.2 Search widget. Inside its .js file is the following few lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.own(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on(this.searchDijit, 'select-result', lang.hitch(this, '_onSelectResult'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if there's away to hitch on to this &lt;EM&gt;exact&lt;/EM&gt; same event from another custom non-panel widget. The desired behavior is that whenever the out-of-the-box Search widget's searchDigit fires its 'select-result' event, this other &lt;EM&gt;custom&lt;/EM&gt; widget can perform an action as well, using the same argument object that is passed to the local Search's event handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to avoid modifying the out-of-the-box Search widget's code, as it seems pretty tightly coupled to the WAB layout. Though if there are any best practices for this latter approach, I'm open to those as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 22:38:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/track-another-widget-s-events/m-p/788760#M3840</guid>
      <dc:creator>AnthonyPreston1</dc:creator>
      <dc:date>2015-11-10T22:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Track another widget's events</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/track-another-widget-s-events/m-p/788761#M3841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anthony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Sure you can all you need to do is get a reference to the search widget object using &lt;A href="https://developers.arcgis.com/web-appbuilder/api-reference/widgetmanager.htm"&gt;WidgetManager&lt;/A&gt; and then you will have access to the this.searchDijit and you can attach as many event listeners as you want to the 'select-result'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 23:07:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/track-another-widget-s-events/m-p/788761#M3841</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-11-10T23:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Track another widget's events</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/track-another-widget-s-events/m-p/788762#M3842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a feeling this'd be the case, thanks. Just wasn't sure if I'd be able to access the .searchDijit that way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 23:29:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/track-another-widget-s-events/m-p/788762#M3842</guid>
      <dc:creator>AnthonyPreston1</dc:creator>
      <dc:date>2015-11-10T23:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Track another widget's events</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/track-another-widget-s-events/m-p/788763#M3843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , I'm wondering did you ever find a way to get this searchDijit from WidgetManager instance.I got till the search Widget , but couldnt get to the searchDijit from that. I'm stuck currently.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 03:06:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/track-another-widget-s-events/m-p/788763#M3843</guid>
      <dc:creator>SumathyAlwar_Arunachalam1</dc:creator>
      <dc:date>2018-04-30T03:06:04Z</dc:date>
    </item>
  </channel>
</rss>

