hi! I need to populate a flex combobox with the result query of a oracle db, using coldfusion.
I have this code, but it is not functioning:

my flex webpage:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	
	<mx:Label x="230" y="36" text="Selecionar Consolas"/>
	
<mx:Script>
        <![CDATA[
            
            import mx.events.*;
            import mx.collections.*;
            import mx.rpc.events.ResultEvent;
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            import mx.events.ListEvent;
            import mx.core.Application; 

            [Bindable]
            public var Result: ArrayCollection;
	        public function ResulQuery(event:ResultEvent):void
            {
        	    Result = event.result as ArrayCollection;
            }
	
public function datos():void
        {
        conexionbd.listar_consolas.send();
        }
        
	]]>
</mx:Script>


	<mx:WebService id="conexionbd"  wsdl="http://127.0.0.1:8500/conexionbd.cfc?wsdl">
		<mx:operation name="listar_consolas" result="ResulQuery(event)">
			
		</mx:operation>
    </mx:WebService>
    
    
<mx:ComboBox x="230" y="76" dataProvider="{Result}" labelField="plataforma_producto"></mx:ComboBox>
	
    
    
</mx:Application>

my coldfusion webservice:

<cfcomponent>
	
	<cffunction name="listar_consolas" returnType="Query" access="remote" >
		<cfquery name="qGet" datasource="conexionbd" >
			select plataforma_producto
			from producto
			where tipo_producto=1 and status='i'
		</cfquery>
		<cfreturn qGet>
	</cffunction>


</cfcomponent>

Why is not working?

I already solved my problem with the following code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	
	<mx:Label x="230" y="36" text="Selecionar Consolas"/>
	
<mx:Script>
        <![CDATA[
            
            import mx.events.*;
            import mx.collections.*;
            import mx.rpc.events.ResultEvent;
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            import mx.events.ListEvent;
            import mx.core.Application; 

            [Bindable]
            public var Result: ArrayCollection;
	        public function ResulQuery(event:ResultEvent):void
            {
        	    Result = event.result as ArrayCollection;
            }
	
public function datos():void
        {
        conexionbd.listar_consolas.send();
        }
        
	]]>
</mx:Script>


	<mx:WebService id="conexionbd"  wsdl="http://127.0.0.1:8500/conexionbd.cfc?wsdl">
		<mx:operation name="listar_consolas" result="ResulQuery(event)">
			
		</mx:operation>
    </mx:WebService>
    
    
<mx:ComboBox x="230" y="76" dataProvider="{Result}" labelField="PLATAFORMA_PRODUCTO" creationComplete="datos()"></mx:ComboBox>
	
        
</mx:Application>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.