<?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/178152#M5627</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;i'm new in flex, and im working on Webmapping application using flex 4.6, java, and sql server as database, i'm just trying to make a communication between wigdets, i would like to copy each selected item of my combobox in widget1, and show it in the textinput in widget2, i just followed this steps explaind by Robert here &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=widget+communication" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=widget+communication&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=widget+communication" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=widget+communication&lt;/A&gt;&lt;SPAN&gt; but no luck, the problem that i'm facing is that i can't call components of the first widget (textinput, button....) from the second widget, they are often underlined !!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;at jump you found the change i made, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&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;var layoutArr:ArrayCollection = new ArrayCollection();
&amp;nbsp;&amp;nbsp; private function widgetCommunication1():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; addSharedData("Liste des chapitres", layoutArr); 
&amp;nbsp;&amp;nbsp; }&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; xmlns:s="library://ns.adobe.com/flex/spark"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx"
&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; width="638" height="552" creationComplete="application1_applicationCompleteHandler(event)" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialize="basewidget1_initializeHandler(event)"&amp;gt;

&amp;lt;fx:Script&amp;gt;
&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;&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 com.esri.viewer.AppEvent;
&amp;nbsp;&amp;nbsp; import mx.events.FlexEvent;
 protected function basewidget1_initializeHandler(event:FlexEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewerContainer.addEventListener(AppEvent.DATA_PUBLISH, sharedDataUpdated);
&amp;nbsp;&amp;nbsp; }

 private function sharedDataUpdated(event:AppEvent):void
&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; if (data.key == "Liste des chapitres")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dplist.selectedIndex = &lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;IntChap&lt;/STRONG&gt;.text;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp; } 

]]&amp;gt;
 &amp;lt;/fx:Script&amp;gt;

&amp;lt;s:DropDownList id="dplist" x="10" y="10" width="282" height="26" labelField="IntituleChap" dataProvider="{RemoteRapportDao.Selection.lastResult}" change="dplist_changeHandler(event)" &amp;gt;&amp;lt;/s:DropDownList&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IntChap wich is on red and bold is the textinput in widget1 , i got it underlined in widget 2, even if i made this communication&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;any one can tell me what i'm messing ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;any help or code will be appreciated !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:08:49 GMT</pubDate>
    <dc:creator>SaadiaElaarji</dc:creator>
    <dc:date>2021-12-11T09:08:49Z</dc:date>
    <item>
      <title>Communication between widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/178152#M5627</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;i'm new in flex, and im working on Webmapping application using flex 4.6, java, and sql server as database, i'm just trying to make a communication between wigdets, i would like to copy each selected item of my combobox in widget1, and show it in the textinput in widget2, i just followed this steps explaind by Robert here &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=widget+communication" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=widget+communication&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=widget+communication" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=widget+communication&lt;/A&gt;&lt;SPAN&gt; but no luck, the problem that i'm facing is that i can't call components of the first widget (textinput, button....) from the second widget, they are often underlined !!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;at jump you found the change i made, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&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;var layoutArr:ArrayCollection = new ArrayCollection();
&amp;nbsp;&amp;nbsp; private function widgetCommunication1():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; addSharedData("Liste des chapitres", layoutArr); 
&amp;nbsp;&amp;nbsp; }&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; xmlns:s="library://ns.adobe.com/flex/spark"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx"
&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; width="638" height="552" creationComplete="application1_applicationCompleteHandler(event)" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialize="basewidget1_initializeHandler(event)"&amp;gt;

&amp;lt;fx:Script&amp;gt;
&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;&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 com.esri.viewer.AppEvent;
&amp;nbsp;&amp;nbsp; import mx.events.FlexEvent;
 protected function basewidget1_initializeHandler(event:FlexEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewerContainer.addEventListener(AppEvent.DATA_PUBLISH, sharedDataUpdated);
&amp;nbsp;&amp;nbsp; }

 private function sharedDataUpdated(event:AppEvent):void
&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; if (data.key == "Liste des chapitres")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dplist.selectedIndex = &lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;IntChap&lt;/STRONG&gt;.text;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp; } 

]]&amp;gt;
 &amp;lt;/fx:Script&amp;gt;

&amp;lt;s:DropDownList id="dplist" x="10" y="10" width="282" height="26" labelField="IntituleChap" dataProvider="{RemoteRapportDao.Selection.lastResult}" change="dplist_changeHandler(event)" &amp;gt;&amp;lt;/s:DropDownList&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IntChap wich is on red and bold is the textinput in widget1 , i got it underlined in widget 2, even if i made this communication&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;any one can tell me what i'm messing ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;any help or code will be appreciated !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:08:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/178152#M5627</guid>
      <dc:creator>SaadiaElaarji</dc:creator>
      <dc:date>2021-12-11T09:08:49Z</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/178153#M5628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Saadia,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; The principle of widget communication is to pass data (an array collection or object) between widgets, not to allow a component or variable of one widget to be seen and used by another. If you are wanting widget 2 to get the text in the intchap.text then you need to pass that text value in the array collection that is passed from widget 1.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 13:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/178153#M5628</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-06-02T13:12:50Z</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/178154#M5629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you for your reply, it works now &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 22:13:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/communication-between-widgets/m-p/178154#M5629</guid>
      <dc:creator>SaadiaElaarji</dc:creator>
      <dc:date>2014-06-05T22:13:19Z</dc:date>
    </item>
  </channel>
</rss>

