<?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: One arraycollection for 2 widgets in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671140#M19728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much Robert!&amp;nbsp; That is a great document.&amp;nbsp; I am lost as to why my plethora of searches on the subject here did not yield that thread.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again all.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 May 2013 12:44:46 GMT</pubDate>
    <dc:creator>AaronPerry</dc:creator>
    <dc:date>2013-05-06T12:44:46Z</dc:date>
    <item>
      <title>One arraycollection for 2 widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671135#M19723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have 2 widgets that need to share an arraycollection.&amp;nbsp; I want to create the collection once in which ever widget initializes first, and then store it for them both to use from that point forward.&amp;nbsp; I've looked at DataManager and I can see how I would share data in an event driven way. What I don't see is a way to store data in DataManager when either widget initializes and 1) check for the data's existence when the second widget loads so I don't have to create it again, and 2) how I would retrieve the stored data in the second widget if I could check for its existence in DataManager.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For reference, the driving force here is that I have comboboxes in each widget that need to use the same data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone explain how I would share a single collection of data between widgets that only gets initialized once?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Aaron&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 19:51:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671135#M19723</guid>
      <dc:creator>AaronPerry</dc:creator>
      <dc:date>2013-05-01T19:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: One arraycollection for 2 widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671136#M19724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been there.&amp;nbsp; It's a bit hard to visualize but it's possible to share data.&amp;nbsp; Let's see if I can explain it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When the data is initialized you should dispatch a DATA_PUBLISH event containing the data.&amp;nbsp; Each of your widgets should listen for that event, then save a copy of the data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But what if the DATA_PUBLISH happens before your widget is initialized?&amp;nbsp; For that you'll need the DATA_SENT event.&amp;nbsp; Dispatch a DATA_FETCH to trigger it, then it will return the DATA_PUBLISH results if they exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, by using DATA_PUBLISH and DATA_SENT you can share data between widgets regardless of where or when it originates.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 17:43:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671136#M19724</guid>
      <dc:creator>KennyHoran</dc:creator>
      <dc:date>2013-05-02T17:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: One arraycollection for 2 widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671137#M19725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I had to do this I just "cheated" and used a global var.&amp;nbsp; It was just so much easier.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 13:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671137#M19725</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2013-05-03T13:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: One arraycollection for 2 widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671138#M19726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much Kenny.&amp;nbsp; This is what I needed to hear.&amp;nbsp; I had seen a lot of posts about sharing data with DataManager, but this made it click after careful consideration of your explanation. I may post some basic code here later to help others who need help trying to "visualize" it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 18:45:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671138#M19726</guid>
      <dc:creator>AaronPerry</dc:creator>
      <dc:date>2013-05-03T18:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: One arraycollection for 2 widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671139#M19727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Here is a thread and a PDF explaining widget communication:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/38899-Widget-Communication-Explained"&gt;http://forums.arcgis.com/threads/38899-Widget-Communication-Explained&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 20:08:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671139#M19727</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2013-05-03T20:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: One arraycollection for 2 widgets</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671140#M19728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much Robert!&amp;nbsp; That is a great document.&amp;nbsp; I am lost as to why my plethora of searches on the subject here did not yield that thread.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again all.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 12:44:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/one-arraycollection-for-2-widgets/m-p/671140#M19728</guid>
      <dc:creator>AaronPerry</dc:creator>
      <dc:date>2013-05-06T12:44:46Z</dc:date>
    </item>
  </channel>
</rss>

