<?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: Can A Widget Send Message to LayerList Widget? in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/can-a-widget-send-message-to-layerlist-widget/m-p/787014#M3709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If the data has already been published before the layerlist widget is open and listening then you need to add: this.fetchData(); to the startup function in the layerlist widget.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 May 2016 00:10:35 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2016-05-13T00:10:35Z</dc:date>
    <item>
      <title>Can A Widget Send Message to LayerList Widget?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/can-a-widget-send-message-to-layerlist-widget/m-p/787013#M3708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I use 2 different publishData functions inside startup () of Widget A, I want to send out the message: ‘ABCD’. See codes below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;startup: function() {&lt;/P&gt;&lt;P&gt; this.inherited(arguments);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.publishData({&amp;nbsp; &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; message: 'ABCD'&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; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.publishData({&amp;nbsp; &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; message: 'XYZ'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; &lt;/P&gt;&lt;P&gt;} // start up ends here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I set up the onReceiveData function in Layer List widget as the following; I want to receive this signal 'ABCD' from Widget A and display it (I &lt;STRONG&gt;don’t &lt;/STRONG&gt;want &lt;STRONG&gt;XYZ&lt;/STRONG&gt; to be passed since it will be used for another function). See codes below: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;onReceiveData: function (name, widgetId, data, historyData) {&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (name === 'Widget A'&amp;amp;&amp;amp; data.hasOwnProperty(‘ABCD')) {&amp;nbsp; &lt;/P&gt;&lt;P&gt; alert("The Layer List Widget received the signal ABCD");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._clearLayers();&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.showLayers();&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } //if ends here &lt;/P&gt;&lt;P&gt;)}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I never see any alert pop up window coming out. Why cann’t my onReceiveData function in LayerList Widget receive this message ‘ABCD’ from Widget A? Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 21:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/can-a-widget-send-message-to-layerlist-widget/m-p/787013#M3708</guid>
      <dc:creator>LeiZhou1</dc:creator>
      <dc:date>2016-05-12T21:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can A Widget Send Message to LayerList Widget?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/can-a-widget-send-message-to-layerlist-widget/m-p/787014#M3709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If the data has already been published before the layerlist widget is open and listening then you need to add: this.fetchData(); to the startup function in the layerlist widget.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 00:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/can-a-widget-send-message-to-layerlist-widget/m-p/787014#M3709</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-05-13T00:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can A Widget Send Message to LayerList Widget?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/can-a-widget-send-message-to-layerlist-widget/m-p/787015#M3710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks！&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 15:23:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/can-a-widget-send-message-to-layerlist-widget/m-p/787015#M3710</guid>
      <dc:creator>LeiZhou1</dc:creator>
      <dc:date>2016-05-16T15:23:37Z</dc:date>
    </item>
  </channel>
</rss>

