Hi, I did a trace using trace(ObjectUtil.toString(event.result));
I was able to see what my result handler had and it clearly shows duplicate data. I see an array and at position zero[0] and position[1], i see the exact same thing in the flex console when I debug the app. At first glance I thought it might be the sql, but the sql is correct, I wrote the results of the query to a file using cffile and all is good, somewhere between the function call and the result handler somethin is going wrong. Any help highly appreciated. -Malik --- In [email protected], "malik_robinson" <[EMAIL PROTECTED]> wrote: > > Hi, > > I seem to be getting duplicate values being displayed in my combo box > component. I am using Flex and CF. The query returns two records and > ultimately the combo box gets populated, but it has two values > > So I am getting > > Project Name: > XO Project > XO Project > > There are two records that part is right, but the text in the actual > drop down is duplicated. The query is correct so its not an issue with > the sql and/or my cfc. It seems like there is a problem in the loop or > something, I am not sure. > > Here is the combo box code: > > <?xml version="1.0" encoding="utf-8"?> > <mx:ComboBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" > toolTip="List of Projects" > labelField="projectName"> > > <mx:Script> > <![CDATA[ > import com.adobe.actors.ApplicationState; > import com.adobe.actors.Project; > import mx.collections.ArrayCollection; > [Bindable] > public var firstEntry:String = "All"; > > public function selectProject( e:Project ) : void > { > var dp:ArrayCollection = dataProvider as ArrayCollection; > for(var i:int=0; i < dp.length; i++) { > var test:Object = dp.getItemAt(i) as Project; > if( test.id == e.projectId ) { > selectedIndex = i; > break; > } > } > } > > > > ]]> > </mx:Script> > <mx:dataProvider> > {ApplicationState.instance.listOfProjects} > </mx:dataProvider> > > > </mx:ComboBox> > > ****** > > This is a snippet from my ApplicationState.as file > > private var _listOfProjects:ArrayCollection; > > [Bindable(event="projectsChanged")] > > public function set listOfProjects( ac:ArrayCollection ) : void { > _listOfProjects = ac; > var dummyProject:Project = new Project(); > dummyProject.projectId = ""; > dummyProject.projectName = "Select"; > > _listOfProjects.addItemAt(dummyProject, 0 ); > dispatchEvent( new FlexEvent("projectsChanged") ); > } > > > public function get listOfProjects() : ArrayCollection { > return _listOfProjects; > } >

