Greetings, Here is what I'm working on. We have a list of Bus Routes. When a user clicks on a Bus Route from the list it calls a MouseEvent that zooms to that particular route. I can get it to zoom to the route but the problem is with how the List is populated. Since the List is populating from the queryTask.executeLastResult.features it's populating the List with these long named features from what I can tell. What I want it to do is populate the List with the NAME attribute that stores the Route Name.I have provided the code below of how I created the list, and then the functions that I seem to be stuck on.I have also created a <esri:GraphicsLayer id="myGraphicsLayer"/> inside my <esri:Map> tag if that helps. I also have the Selected Route changing to a different color but can't seem to reset it back if a new route is selected.Currently this is what gets populated in the LIST for the NAMES: RTCInteractiveSystemMap.ApplicationSkin3._ApplicationSkin_Group1.contectGroup.BorderContainer6.BorderContainerSkin9.Group10.myMap.LayerContainer12.myGraphicsLayer.Graphic###The ### represent the different graphics in the List and change for each record in the list.I need it to show the NAME attribute of the data.private var contentNavigator:ContentNavigator = new ContentNavigator(); protected function doQuery():void { queryTask.execute(query); } protected function routeList_clickHandler(event:MouseEvent):void { var currentGraphic:Graphic = List(event.currentTarget).selectedItem as Graphic; contentNavigator.dataProvider = new ArrayList([ currentGraphic ]); currentGraphic.symbol = sls1; myMap.zoomTo(currentGraphic.geometry); } protected function queryTask_executeCompleteHandler(event:QueryEvent):void { myGraphicsLayer.graphicProvider = event.featureSet.features; routeList.dataProvider = new ArrayCollection(queryTask.executeLastResult.features); /* This is where the List is getting populated but if I change it to ".attributes" instead of features it of course doesn't work */ /* routeList.LabelField = "NAME"; */ }
<s:List id="routeList" x="10" y="10" width="225" height="554" rollOverColor="#CCCCCC" horizontalScrollPolicy="on" visible="{queryTask.executeLastResult !=null}" creationComplete="doQuery()" click="routeList_clickHandler(event)"/>