Select to view content in your preferred language

Binding an autocomplete function to a query

2542
0
10-08-2010 06:03 AM
AaronNash
Deactivated User
I created an application to query an ArcServer service using the arcgis 2.1 api and flex 4.1, the query is bound to a textinput box to search for a street name and the returned results populate a datagrid. My goal is to add an autocomplete function from this site
http://www.jabbypanda.com/blog/2010/03/autocomplete-component-for-flex-4-that-supports-entered-text-...
I am having trouble binding the data from the autocomplete function to the query function. At first I tried to bind the data from the autocomplete to the textinput box and change the visiblity of the textinput to false, then still have the query function bound to the textinput box. Did not have any success there, then I tried to have the query function bound to the autocomplete function directly, no successs there either. Any help would be appreciated, I have the autocomplete function working I just need the query to look at the selected item from the autocomplete. The attached code creates two textinput box one for the autocomplete and the other the query fucntion uses.

  <esri:Query id="query"
     outFields="[NumBdRms]"
     returnGeometry="false" text="{streetName.text}"/>
</fx:Declarations>  
<s:Panel title="Search Property Record Information">
  <s:layout>
   <s:VerticalLayout/>
  </s:layout>
  <s:HGroup verticalAlign="middle" >
   <s:Label text="Enter"/>
   <s:TextInput id="streetName" visible="true"/>
   <org:AutoComplete id="autocomplete" 
         forceOpen="false"
         skinClass="skins.AutoCompleteSkin"
         width="100"/>
Tags (2)
0 Kudos
0 Replies