<?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 ArcGIS FLEX API 2.2- How to load widget data every 30 second in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754139#M22667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to implement a widget with auto data load and refresh every 30 second. My environment as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Flex API : ArcGIS &lt;SPAN style="font-size: 13.3333339691162px;"&gt;Flex viewer &lt;/SPAN&gt; 2.2 (cannot change&amp;nbsp; the version as many dependencies ) &lt;/P&gt;&lt;P&gt;2) ArcGIS Server 10.1 SP1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to load widget data every 30 second after opening the widget. My widget container contains list of incident point and it need to be update 30 second or 1 min. How can I implement self loading widget ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you advice is highly appreciate&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 10:12:39 GMT</pubDate>
    <dc:creator>AnjithaSenarath</dc:creator>
    <dc:date>2014-09-15T10:12:39Z</dc:date>
    <item>
      <title>ArcGIS FLEX API 2.2- How to load widget data every 30 second</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754139#M22667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to implement a widget with auto data load and refresh every 30 second. My environment as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Flex API : ArcGIS &lt;SPAN style="font-size: 13.3333339691162px;"&gt;Flex viewer &lt;/SPAN&gt; 2.2 (cannot change&amp;nbsp; the version as many dependencies ) &lt;/P&gt;&lt;P&gt;2) ArcGIS Server 10.1 SP1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to load widget data every 30 second after opening the widget. My widget container contains list of incident point and it need to be update 30 second or 1 min. How can I implement self loading widget ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you advice is highly appreciate&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 10:12:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754139#M22667</guid>
      <dc:creator>AnjithaSenarath</dc:creator>
      <dc:date>2014-09-15T10:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS FLEX API 2.2- How to load widget data every 30 second</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754140#M22668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Anjitha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where is your data coming from? If it is being served from your arcgis server then you could add the layer as normal and use the autorefresh property of the layer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_tag_overview/01m30000000p000000/"&gt;http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_tag_overview/01m30000000p000000/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are loading data from somewhere else (like a xml file) then have a look at how the GeoRSS feed handles the autorefresh:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-viewer-flex/blob/develop/src/widgets/GeoRSS/GeoRSSWidget.mxml"&gt;https://github.com/Esri/arcgis-viewer-flex/blob/develop/src/widgets/GeoRSS/GeoRSSWidget.mxml&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 11:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754140#M22668</guid>
      <dc:creator>AnthonyGiles</dc:creator>
      <dc:date>2014-09-15T11:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS FLEX API 2.2- How to load widget data every 30 second</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754141#M22669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Anthony &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I am using ArcGIs server 10.1 and data coming from Map service. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 13.3333339691162px;"&gt;ArcGIS &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333339691162px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Flex viewer &lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 13.3333339691162px;"&gt;2.2 and I couldn't get this auto refresh working even if I added auto-refresh property set to 30 . There was no call back to server and layer stay as It is . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 13.3333339691162px;"&gt;Then I tried same setup with Feature service and It didn't work too. What I am missing here ? appreciate your direction &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 11:34:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754141#M22669</guid>
      <dc:creator>AnjithaSenarath</dc:creator>
      <dc:date>2014-09-16T11:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS FLEX API 2.2- How to load widget data every 30 second</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754142#M22670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The refresh property didn't exist in the 2.2 version. It was added at 3.1 for FeatureLayer in FlexViewer.&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/What_was_new_in_ArcGIS_Viewer_3_1_for_Flex/01m300000054000000/"&gt;http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/What_was_new_in_ArcGIS_Viewer_3_1_for_Flex/01m300000054000000/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:55:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754142#M22670</guid>
      <dc:creator>BjornSvensson</dc:creator>
      <dc:date>2014-09-16T15:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS FLEX API 2.2- How to load widget data every 30 second</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754143#M22671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bjorn,&lt;/P&gt;&lt;P&gt;what about version 3.6 , is it can do that ?/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 05:54:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754143#M22671</guid>
      <dc:creator>MohammedKhamis</dc:creator>
      <dc:date>2014-09-17T05:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS FLEX API 2.2- How to load widget data every 30 second</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754144#M22672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes from 3.1 onwards had that capability&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 06:31:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754144#M22672</guid>
      <dc:creator>AnthonyGiles</dc:creator>
      <dc:date>2014-09-17T06:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS FLEX API 2.2- How to load widget data every 30 second</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754145#M22673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bjorn Thank you for the reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually It does even if ESRI is not&amp;nbsp; putting it on help pages&lt;/P&gt;&lt;P&gt;Here is steps to proceed if you use older version of Flex API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Publish your map service (Map Service. No need feature service but layer type is feature) &lt;/P&gt;&lt;P&gt;2) In Flex viewer source code's go to &amp;gt; com.esri.viewers &amp;gt; Managers &amp;gt; MapManager.mxml and locate below function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private function addLayerToMap(layerObject:Object, operationalLayer:Boolean):void{}&lt;/P&gt;&lt;P&gt;In that find the switch and find the "&amp;nbsp;&amp;nbsp; case "feature":&amp;nbsp; "&amp;nbsp; and add below code (which is not in original code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (autoRefresh &amp;gt; 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; setInterval(featureLayer.refresh, autoRefresh * 1000);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Go to layer config file and add autorefresh property as to layer xml file&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333339691162px;"&gt;autorefresh world is case sensitive so do not use any capital letters. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;layer label="your layer name" type="feature" visible="true" autorefresh="30" disableclientcaching="true" mode="onDemand" /&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you may have more attributes to your layer. I have set &lt;SPAN style="font-size: 13.3333339691162px;"&gt;autorefresh property to 30 seconds. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333339691162px;"&gt;This will refresh the map and add any new records to map. However it will not update the opened widget's data list. I think I need to write some more codes to refresh widget data. Anyone has experience in this to reload Query widget by getting layer property "&lt;SPAN style="font-size: 13.3333339691162px;"&gt;autorefresh"&amp;nbsp; ?&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 08:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/arcgis-flex-api-2-2-how-to-load-widget-data-every/m-p/754145#M22673</guid>
      <dc:creator>AnjithaSenarath</dc:creator>
      <dc:date>2014-09-17T08:10:34Z</dc:date>
    </item>
  </channel>
</rss>

