<?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: Closing Widget in Flex Viewer 2.4 in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/closing-widget-in-flex-viewer-2-4/m-p/137592#M4536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you ever get an answer to this? I am also trying to address. Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2012 11:10:29 GMT</pubDate>
    <dc:creator>KeithGerhartz1</dc:creator>
    <dc:date>2012-03-28T11:10:29Z</dc:date>
    <item>
      <title>Closing Widget in Flex Viewer 2.4</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/closing-widget-in-flex-viewer-2-4/m-p/137591#M4535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How to close a widget completely in flex viewer 2.4? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;clicking the "x" in upper right is not closing the widget completely. I need to close a widget and open it newly (need to get initialize and widgetConfigLoaded events)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tried the below code in my widget but doesn't seem to work. Next time when I open the widget, it is not even capturing the events initialize and widgetConfigLoaded. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; //open the widget&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AppEvent.dispatch(AppEvent.WIDGET_RUN,ViewerContainer.getInstance().getWidgetId("MyWidget"));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//close the widget (closed="widgetClosedHandler(event)")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; private function widgetClosedHandler(event:Event):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; AppEvent.dispatch(AppEvent.WIDGET_CHANGE_STATE,{id:this.widgetId,State:WidgetStates.WIDGET_CLOSED});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any help?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2011 12:50:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/closing-widget-in-flex-viewer-2-4/m-p/137591#M4535</guid>
      <dc:creator>sreeharikottoormadam</dc:creator>
      <dc:date>2011-08-16T12:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Widget in Flex Viewer 2.4</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/closing-widget-in-flex-viewer-2-4/m-p/137592#M4536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you ever get an answer to this? I am also trying to address. Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 11:10:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/closing-widget-in-flex-viewer-2-4/m-p/137592#M4536</guid>
      <dc:creator>KeithGerhartz1</dc:creator>
      <dc:date>2012-03-28T11:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Widget in Flex Viewer 2.4</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/closing-widget-in-flex-viewer-2-4/m-p/137593#M4537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One issue maybe that the s needs to be lowercase in &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;State:WidgetStates.WIDGET_CLOSED&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;should be&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;state:WidgetStates.WIDGET_CLOSED&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 02:29:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/closing-widget-in-flex-viewer-2-4/m-p/137593#M4537</guid>
      <dc:creator>HaroldBostic</dc:creator>
      <dc:date>2013-04-11T02:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Widget in Flex Viewer 2.4</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/closing-widget-in-flex-viewer-2-4/m-p/137594#M4538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Why do you want to re-open it any way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was having the same issue of re-loading settings, layers and other stuff,I solved it by catching initialize, widgetConfigLoaded and addedToStage events in conjuction with a global bool variable to hold value to see if it is fresh run for the widget or it was closed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is working for me in many widgets right now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2013 18:03:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/closing-widget-in-flex-viewer-2-4/m-p/137594#M4538</guid>
      <dc:creator>omega_cancer</dc:creator>
      <dc:date>2013-04-12T18:03:03Z</dc:date>
    </item>
  </channel>
</rss>

