<?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: Close widget programatically in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618984#M13751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sandra,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; If you are calling the code from within the widget than just use&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; widgetState = WIDGET_CLOSED;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; notifyStateChanged(WidgetStates.WIDGET_CLOSED);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 02:26:27 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-12T02:26:27Z</dc:date>
    <item>
      <title>Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618981#M13748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've set up my search widget to find a parameter from the URL and zoom to that feature. Once that goal has been accomplished I would like the widget to close automatically. Can it be done? Other option is changing all the pass parameters through URL into the mapManager and I;m trying not to go backwards from where I'm at.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 20:08:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618981#M13748</guid>
      <dc:creator>SandraPanicucci</dc:creator>
      <dc:date>2011-03-09T20:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618982#M13749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This thread covered how to close multiple widgets&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/25015-Closing-Multiple-Widgets"&gt;http://forums.arcgis.com/threads/25015-Closing-Multiple-Widgets&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But my post in there should work to close a single widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After that, it requires a little more work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 20:42:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618982#M13749</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2011-03-09T20:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618983#M13750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rene; Thanks for responding. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where did you implement this code? Have made several attempts and not come up with the right answer. THough it looks like it shouldn't be as hard as I'm maknig it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2011 13:29:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618983#M13750</guid>
      <dc:creator>SandraPanicucci</dc:creator>
      <dc:date>2011-03-10T13:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618984#M13751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sandra,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; If you are calling the code from within the widget than just use&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; widgetState = WIDGET_CLOSED;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; notifyStateChanged(WidgetStates.WIDGET_CLOSED);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:26:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618984#M13751</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T02:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618985#M13752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I add these lines&amp;nbsp; I get the error message in the attachment which generally seems to mean I need an import statement but don't seem to be able to figure out which one I need here. Any clue would be greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 15:53:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618985#M13752</guid>
      <dc:creator>SandraPanicucci</dc:creator>
      <dc:date>2011-03-11T15:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618986#M13753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sandra,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Are you not calling this code from inside a widget? If not than you need other code to get this to work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 16:04:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618986#M13753</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-03-11T16:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618987#M13754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm attempting to call it from within the search widget.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 16:06:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618987#M13754</guid>
      <dc:creator>SandraPanicucci</dc:creator>
      <dc:date>2011-03-11T16:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618988#M13755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import com.esri.viewer.WidgetStates;

private function CloseMe():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var data:Object =
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: this.widgetId,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state: WidgetStates.WIDGET_CLOSED
&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_STATE_CHANGED,data,null));
&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:26:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618988#M13755</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T02:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618989#M13756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1120: Access of undefined property widgetStates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the 2.1 library if that makes a difference.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 17:21:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618989#M13756</guid>
      <dc:creator>SandraPanicucci</dc:creator>
      <dc:date>2011-03-11T17:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618990#M13757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sandra,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Yep that makes a difference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import com.esri.viewer.BaseWidget;

private function CloseMe():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var data:Object =
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: this.widgetId,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state: BaseWidget.WIDGET_CLOSED
&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_STATE_CHANGED,data,null));
&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:26:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618990#M13757</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T02:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Close widget programatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618991#M13758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Beautiful! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thank you and sorry for not mentioning what library I was working in in the first place.:)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 12:29:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/close-widget-programatically/m-p/618991#M13758</guid>
      <dc:creator>SandraPanicucci</dc:creator>
      <dc:date>2011-03-14T12:29:42Z</dc:date>
    </item>
  </channel>
</rss>

