<?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: Opening a widget from another widget in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376605#M10773</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert - I will double check and make sure it's consistent.&amp;nbsp; Thanks so much!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jul 2012 18:55:31 GMT</pubDate>
    <dc:creator>JosephGrubbs</dc:creator>
    <dc:date>2012-07-19T18:55:31Z</dc:date>
    <item>
      <title>Opening a widget from another widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376601#M10769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm working on the building blocks for a custom widget/Popup window.&amp;nbsp; As a first step, I'm setting up to have a custom "Add to Favorites" button in the PopUp window fire a "RequestWidget" (a request for more information form) to open.&amp;nbsp; When I use the code recommendations posted in the FV 3.0 forum, I receive the following error message.&amp;nbsp; The code segments are below the error message.&amp;nbsp; Any suggestions?&amp;nbsp; Thanks so much in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TypeError: Error #1009: Cannot access a property or method of a null object reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at com.esri.viewer.managers::WidgetManager/onRunWidget()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at flash.events::EventDispatcher/dispatchEventFunction()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at flash.events::EventDispatcher/dispatchEvent()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at com.esri.viewer::AppEvent$/dispatch()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at com.esri.viewer.customskins::PopUpRendererSkin/addToFavs_clickHandler()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at com.esri.viewer.customskins::PopUpRendererSkin/__addToFavsButton_click()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import com.esri.viewer.AppEvent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import com.esri.viewer.managers.WidgetManager;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import com.esri.viewer.ViewerContainer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private function addToFavs_clickHandler(event:MouseEvent):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AppEvent.dispatch(AppEvent.WIDGET_RUN,ViewerContainer.getInstance().widgetManager.getWidgetId("request"));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 01:38:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376601#M10769</guid>
      <dc:creator>JosephGrubbs</dc:creator>
      <dc:date>2012-07-19T01:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Opening a widget from another widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376602#M10770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Joe,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; So the Label (What appears as the widgets title) for your request widget is just "request"?... Also if you look at the error trace the error is actually coming from line 298 of your customskins\PopUpRendererSkin.mxml, what is on that line?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 09:29:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376602#M10770</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2012-07-19T09:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Opening a widget from another widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376603#M10771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert - The widget label actually is "RequestWidget" but using this was unsuccessful, also, so I attempted the id "request"...I'll change back to the label.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are lines 296-299&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private function addToFavs_clickHandler(event:MouseEvent):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AppEvent.dispatch(AppEvent.WIDGET_RUN,ViewerContainer.getInstance().widgetManager.getWidgetId("RequestWidget"));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And lines 316-321&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;!--- @private --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;s:Button id="addToFavsButton"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;click="addToFavs_clickHandler(event)"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fontSize="12"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fontWeight="bold"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;label="Add to Favorites"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much for any assistance you can provide!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 09:57:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376603#M10771</guid>
      <dc:creator>JosephGrubbs</dc:creator>
      <dc:date>2012-07-19T09:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Opening a widget from another widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376604#M10772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Joe,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I just tested this senario in Flex Viewer 2.5 and got my second popup button to launch the bookmarks widget just fine... Are you sure that the label of your other widget you are trying to bring up is "RequestWidget"? Remember Flex is a case sensitive language. So your widget tag looks like this in your main config.xml (Mainly the label I am concerned with).&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; &amp;lt;widget label="&lt;SPAN style="color:#ff0000;"&gt;RequestWidget&lt;/SPAN&gt;" left="380" top="35"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; icon="assets/images/someimage.png"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config="widgets/request/RequestWidget.xml"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="widgets/request/RequestWidget.swf"/&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:23:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376604#M10772</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T17:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Opening a widget from another widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376605#M10773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert - I will double check and make sure it's consistent.&amp;nbsp; Thanks so much!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 18:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376605#M10773</guid>
      <dc:creator>JosephGrubbs</dc:creator>
      <dc:date>2012-07-19T18:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Opening a widget from another widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376606#M10774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert - That did it!&amp;nbsp; I had used the file name instead of the label.&amp;nbsp; When I switched to the label, worked like a charm.&amp;nbsp; Again, I can't thank you enough for all your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 22:43:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/opening-a-widget-from-another-widget/m-p/376606#M10774</guid>
      <dc:creator>JosephGrubbs</dc:creator>
      <dc:date>2012-07-19T22:43:58Z</dc:date>
    </item>
  </channel>
</rss>

