<?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 Setting focus on a specific widget when app first opens in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484368#M13623</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I consider what I want to do mandatory UI functionality, but from the few posts I seen on the forums, I don't think it can be done in the current 2.5 viewer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Background - I am developing a Restaurant Inspection results website.&amp;nbsp; Since it will be widely used by the public, I want it to be easy and simple to use, so no extra mouse clicks necessary if possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question - Is there a way to set the focus to the single widget I am opening when the app initially loads so the user can start typing in a restaurant name without having to click on the widget to give it focus?&amp;nbsp; I did get the focus set on the textinput box using focusManager.setFocus(tiSearch), but I still have to click on the widget itself before it gets focus from the application.&amp;nbsp; Once the widget header has been clicked I can start typing, but I would REALLY like to avoid that initial mouse click requirement if possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Keith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Apr 2012 13:08:56 GMT</pubDate>
    <dc:creator>KeithPalmer</dc:creator>
    <dc:date>2012-04-10T13:08:56Z</dc:date>
    <item>
      <title>Setting focus on a specific widget when app first opens</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484368#M13623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I consider what I want to do mandatory UI functionality, but from the few posts I seen on the forums, I don't think it can be done in the current 2.5 viewer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Background - I am developing a Restaurant Inspection results website.&amp;nbsp; Since it will be widely used by the public, I want it to be easy and simple to use, so no extra mouse clicks necessary if possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question - Is there a way to set the focus to the single widget I am opening when the app initially loads so the user can start typing in a restaurant name without having to click on the widget to give it focus?&amp;nbsp; I did get the focus set on the textinput box using focusManager.setFocus(tiSearch), but I still have to click on the widget itself before it gets focus from the application.&amp;nbsp; Once the widget header has been clicked I can start typing, but I would REALLY like to avoid that initial mouse click requirement if possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Keith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 13:08:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484368#M13623</guid>
      <dc:creator>KeithPalmer</dc:creator>
      <dc:date>2012-04-10T13:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Setting focus on a specific widget when app first opens</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484369#M13624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Keith,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Sure you can it is just a couple of quick changes to code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the index.mxml add a script block:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;&amp;lt;s:Application xmlns:fx="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://ns.adobe.com/mxml/2009" target="_blank"&gt;http://ns.adobe.com/mxml/2009&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:viewer="com.esri.viewer.*"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:managers="com.esri.viewer.managers.*"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pageTitle="Blah Blah"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; creationComplete="init()"&amp;gt;
&amp;nbsp; &amp;lt;fx:Script&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;![CDATA[
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected function init():void
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; navigateToURL(new URLRequest("javascript: document.getElementById('index').focus();"), "_self");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;
&amp;nbsp; &amp;lt;/fx:Script&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This give the flash application itself focus from the browser. Then in the init function of my widget I want to have focus I just add this line:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;txtSearch.setFocus();&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can see this working on my site &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://gis.calhouncounty.org/ParcelViewer2.5/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://gis.calhouncounty.org/ParcelViewer2.5/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;as you are able to type in the parcel search widget without clicking (once the TOC is done loading).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Don't forget to &lt;/SPAN&gt;&lt;STRONG&gt;click the Mark as answer check&lt;/STRONG&gt;&lt;SPAN&gt; on this post and to &lt;/SPAN&gt;&lt;STRONG&gt;click the top arrow (promote)&lt;/STRONG&gt;&lt;SPAN&gt; as shown below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;IMG src="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:21:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484369#M13624</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T21:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Setting focus on a specific widget when app first opens</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484370#M13625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Robert.&amp;nbsp; I assumed you would be the one to have the answer.&amp;nbsp; I was so close.&amp;nbsp; I just forgot the 'creationComplete="init()"&amp;gt;' part.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Keith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 22:14:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484370#M13625</guid>
      <dc:creator>KeithPalmer</dc:creator>
      <dc:date>2012-04-10T22:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Setting focus on a specific widget when app first opens</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484371#M13626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Keith,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad you got it working. Don't forget &lt;/SPAN&gt;&lt;SPAN style="color:#ff0000;"&gt;(the most important step)&lt;/SPAN&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;STRONG&gt;click the Mark as answer check&lt;/STRONG&gt;&lt;SPAN&gt; on this post as shown below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;IMG src="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 22:30:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484371#M13626</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2012-04-10T22:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Setting focus on a specific widget when app first opens</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484372#M13627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What file is the splash screen kept in?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 14:22:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484372#M13627</guid>
      <dc:creator>ChrisSergent</dc:creator>
      <dc:date>2015-07-07T14:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Setting focus on a specific widget when app first opens</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484373#M13628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The widget is called Splash and the widget file is SplashWidget.mxml&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 14:24:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/setting-focus-on-a-specific-widget-when-app-first/m-p/484373#M13628</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-07T14:24:02Z</dc:date>
    </item>
  </channel>
</rss>

