<?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 Communication between widgets in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96095#M3551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone know how I would go about communicating between widgets?&amp;nbsp; I would like to use a button in one widget to call a function in another or change components (label text, visible property, etc) in another widget.&amp;nbsp; Any help will be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Sep 2010 15:07:42 GMT</pubDate>
    <dc:creator>DonCaviness</dc:creator>
    <dc:date>2010-09-28T15:07:42Z</dc:date>
    <item>
      <title>Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96095#M3551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone know how I would go about communicating between widgets?&amp;nbsp; I would like to use a button in one widget to call a function in another or change components (label text, visible property, etc) in another widget.&amp;nbsp; Any help will be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 15:07:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96095#M3551</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2010-09-28T15:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96096#M3552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Don,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Assuming that you are using Flex Viewer 2.x version, every widget extends the BaseWidget class, which has the addSharedData method. This method internally dispatches the AppEvent.DATA_PUBLISH event which is used for inter-widget communication.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Widget 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
private function widgetCommunication1():void
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; addSharedData("your key", shared data(ArrayCollection)); 
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Widget 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009"
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark"
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:viewer="com.esri.viewer.*"
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialize="basewidget1_initializeHandler(event)"
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Script&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;![CDATA[
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; import com.esri.viewer.AppEvent;
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; import mx.events.FlexEvent;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected function basewidget1_initializeHandler(event:FlexEvent):void
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewerContainer.addEventListener(AppEvent.DATA_PUBLISH, sharedDataUpdated);
&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;&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;&amp;nbsp;&amp;nbsp; private function sharedDataUpdated(event:AppEvent):void
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var data:Object = event.data;

&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; if (data.key == "my key") 
&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; {
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // do something..&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;&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; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/fx:Script&amp;gt;

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:40:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96096#M3552</guid>
      <dc:creator>SarthakDatt</dc:creator>
      <dc:date>2021-12-10T23:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96097#M3553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you! That is what I was looking for.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 19:58:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96097#M3553</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2010-09-28T19:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96098#M3554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sarthak,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know of anyway to open a widget from another widget?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 11:39:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96098#M3554</guid>
      <dc:creator>BobCarberry</dc:creator>
      <dc:date>2010-09-29T11:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96099#M3555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bob,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; You have to know your widgets Id number. The widgets id is not a string it is a sequential number that is assigned when the widget is created in FlexViewer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, yourWidgetsID#));&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added a new function to the ViewerContainer.mxml for the purpose of finding a widgets id #&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//Add this new variable at the beginning with the other&amp;nbsp; private and public vars
public var _configData:ConfigData;

//Add this new function
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public function getWidgetId(widgetLabel:String):Number
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var id:Number;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i:Number = 0; i &amp;lt; _configData.widgets.length; i++)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (_configData.widgets&lt;I&gt;.label == widgetLabel)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id = _configData.widgets&lt;I&gt;.id;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; return id;
&amp;nbsp;&amp;nbsp; }

//Add this to the postConfigHandler function
_configData = event.data as ConfigData;
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you can do something like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, ViewerContainer.getWidgetId("Search")));&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:40:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96099#M3555</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T23:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96100#M3556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert, do you know how I would go about calling a function in the flex viewer using a javascript function in a html page?&amp;nbsp; I have found this example on how to communicate between flex and javascript &lt;/SPAN&gt;&lt;A href="http://www.switchonthecode.com/tutorials/flex-javascript-basics-using-externalinterface"&gt;http://www.switchonthecode.com/tutorials/flex-javascript-basics-using-externalinterface&lt;/A&gt;&lt;SPAN&gt; but I am having trouble getting this to work with the 2.1 flex viewer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 13:46:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96100#M3556</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2010-09-29T13:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96101#M3557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I am looking into it. Can you give me a use case or workflow that you are considering this for?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 14:09:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96101#M3557</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-09-29T14:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96102#M3558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is what I am trying to do.&amp;nbsp; I have a custom wrapper that the flex viewer lives in.&amp;nbsp; On the html page a have a button that fires an JavaScript event that changes some information within the html.&amp;nbsp; In the flex viewer I have a widget that will display data depending what is selected by the user clicking on the button in the html wrapper.&amp;nbsp; In other words, I want to change label text, make components visible or hidden, etc. in the widget when the user fires off a JavaScript function.&amp;nbsp; I was successful in using the code snippet provided in this thread to communicate between wigets, so I was hoping I could communicate with the widget but from outside of flex.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 15:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96102#M3558</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2010-09-29T15:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96103#M3559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Took a while to find time for this but here it is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;index.template.html&amp;nbsp; code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;script type="text/javascript"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function getFlexApp(appName)
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (navigator.appName.indexOf ("Microsoft") !=-1)
&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;&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; return window[appName];
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&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;&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; return document[appName];
&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function someFlexFunction()
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getFlexApp('index').flexTalk('Hello World');
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="button" id="butFlexTalk" onclick="someFlexFunction()" value="Say Hello" /&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;index.mxml portion&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
&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; xmlns:s="library://ns.adobe.com/flex/spark"
&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; xmlns:viewer="com.esri.viewer.*"
&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; xmlns:managers="com.esri.viewer.managers.*"
&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; pageTitle="ArcGIS Viewer for Flex"
&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; initialize="initApp()"&amp;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;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Script&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;![CDATA[
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; import mx.controls.Alert;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public function initApp():void
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ExternalInterface.available)
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExternalInterface.addCallback("flexTalk", flexTalk);&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; }
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public function flexTalk(sayThis:String):void
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(sayThis);
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/fx:Script&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Style source="defaults.css"/&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course from here you will have to use some appEvent or something to get from the index.mxml into some widget or what ever you are trying to do.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:40:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96103#M3559</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T23:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96104#M3560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Robert.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Oct 2010 12:22:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96104#M3560</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2010-10-04T12:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96105#M3561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This thread helped me to communicate between widgets, I'm sending a graphic from one widget to another which use the graphic as input to an identifyTask. This works fine as long as both widgets are opened.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the user haven't opened the second widget yet I want to open that widget and send the graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can open the widget (but I have to hardcode the widget id, the getWidgetId function doesn't work for me, but that's another question I asked in another thread). But if the widget is just opened it obviously didn't had time to add the eventlister and litsen to the AppEvent.DATA_PUBLISH, so nothing happens, the user has to do the same request again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas how to accomplish to open a widget and sending data to it at the same time (or at least without any user input after the widget is loaded??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 13:09:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96105#M3561</guid>
      <dc:creator>MattiasEkström</dc:creator>
      <dc:date>2011-03-11T13:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96106#M3562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mattias,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; So are you good on this now based on the other thread?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 14:01:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96106#M3562</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-03-11T14:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96107#M3563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No I still can't achieve all I want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I Have my two widgets open then there is no problem for widget1 to send data to widget2 that uses the data to perform a findtask. But If widgets2 is not loaded it loads but don't perform any findtask. I want it to load and receive the data and perform the findtask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If widget2 is loaded once and then closed so the state of the widget is closed it works fine, but the problem is when the widget never have been opened/loaded during the session.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried to use some fetchSharedData() code at the creationComplete event for widget2 to see if there is any data with my key in shareddata, but I can't fetch any data, don't know how to use the fetchSharedData.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(I saw another &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/16411-sharing-data-between-widgets-%28using-fetchSharedData%29"&gt;thread&lt;/A&gt;&lt;SPAN&gt; about a bug in Datamanager.as, made that change but it didn't changed anything for me).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 12:28:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96107#M3563</guid>
      <dc:creator>MattiasEkström</dc:creator>
      <dc:date>2011-03-15T12:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96108#M3564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mattias,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; In the init of widget 2 you need to add an event listener:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ViewerContainer.addEventListener(AppEvent.DATA_SENT, sharedDataUpdated);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private function sharedDataUpdated(event:AppEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var dataTable:Hashtable = event.data as Hashtable;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (dataTable.containsKey("ParcelAddress"))
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var recAC:ArrayCollection = dataTable.find("ParcelAddress") as ArrayCollection;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i:Number = 0; i &amp;lt; recAC.length; i++)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var obj:Object = recAC&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fitm:* = frmLocateAddress.getChildAt(0);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var tAddress:TextInput = fitm.getChildAt(0) as TextInput;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tAddress.text = obj.paddress;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showStateAddress();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataTable.remove("ParcelAddress");
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously the sharedDataUpdated function is specific to something that I am doing but this gives you and idea. Basically my scenario is if someone uses the search widget for an address and the returned results are empty than I will give them and option to launch the locate widget with that same searched address. So when they click yes they want to use locate then I launch the locate widget with the WIDGET_RUN&amp;nbsp; app event discussed earlier and then because the search widget used the addSharedData function when the widget is launched the code above is used immediately.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96108#M3564</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T23:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96109#M3565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I added the event listener to the init of widget2 and the function to that event listener. But still it doesn't work, the function never runs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My knowledge about AppEvents are limited, but I'm thinking that the event listener is added after the event is dispatched and therefor nothing happens. But if this code work for you, I guess it should work for me to, but it doesn't...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What's the difference between AppEvent.DATA_PUBLISH and AppEvent.DATA_SENT?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The data that is added from addSharedData in widget1 has to be stored somewhere, is there no way to access it from widget2 without any event listeners??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 07:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96109#M3565</guid>
      <dc:creator>MattiasEkström</dc:creator>
      <dc:date>2011-03-16T07:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96110#M3566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mattias,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; AppEvent.DATA_PUBLISH is what gets dispatched by the BaseWidget when the addSharedData function is invoked. AppEvent.DATA_SENT is what gets dispatched when the BaseWidget is done adding the data to the hashtable. BTW I forgot that I was calling fetchSharedData(); in my locate widget when it is shown. fetchSharedData is a function that forces the data sent to get dispached.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 12:37:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96110#M3566</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-03-16T12:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96111#M3567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for&amp;nbsp; all your help Robert!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After I added the call to fetchSharedData() in widget2 it works great.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2011 08:12:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96111#M3567</guid>
      <dc:creator>MattiasEkström</dc:creator>
      <dc:date>2011-03-17T08:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96112#M3568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having the same problem, could you explain where and how you've used fetchSharedData()?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shannaka&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 06:04:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96112#M3568</guid>
      <dc:creator>ShannakaBeveridge</dc:creator>
      <dc:date>2011-03-21T06:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96113#M3569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Shannaka,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess normally you could use the fetchSharedData() in the init function, I use it a bit later because I call a few other functions in my init functions that creates some components and set there values based on info in the config file. But the important thing is that you've added the eventlistenter ( &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;ViewerContainer.addEventListener(AppEvent.DATA_SENT, sharedDataUpdated); &lt;/SPAN&gt;&lt;SPAN&gt;) before you call fetchSharedData(), it's used just to trigger that event.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 06:47:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96113#M3569</guid>
      <dc:creator>MattiasEkström</dc:creator>
      <dc:date>2011-03-21T06:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96114#M3570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you! All working now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2011 02:53:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/96114#M3570</guid>
      <dc:creator>ShannakaBeveridge</dc:creator>
      <dc:date>2011-03-22T02:53:28Z</dc:date>
    </item>
  </channel>
</rss>

