Thank you for everyone's responses, but I'm still not having any luck.  I'm not 
getting any 
errors - but my combobox is not populating.  Again, I'm really new to Flex.

My app is called PreTraffic with the following structure:

PreTraffic
     cfc (folder)
          job.cfc
     JobSearch.cfc

**********************************************************

job.cfc contatins:

<cfcomponent>
        <!--- Get jobs --->
        <cffunction name="GetJob" access="remote" returntype="query" 
output="false">

                <cfset var job="">
                <cfset var results="">
                
                <cfquery datasource="discsdev" name="job">
                        SELECT      job_id, job_title
                        FROM        job
                        WHERE       status = 'O'
                        ORDER BY    job_title
                </cfquery>
                <cfquery dbtype="query" name="results">
                        SELECT          job_title AS label, job_id AS data
                        FROM            job
                        ORDER BY        label
                </cfquery>
                <cfreturn results>
        </cffunction>   
</cfcomponent>

**************************************************************

JobSearch.mxml contains:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
        xmlns:mx="http://www.adobe.com/2006/mxml"; 
        xmlns="*"
        layout="absolute" 
        backgroundGradientColors="[#ffffff, #d0d0d0]"
        creationComplete="InitApp()">
        
        <mx:Style source="style.css" />
        
        <mx:Script>
        <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.rpc.events.ResultEvent;
        
                public function InitApp():void  {
                        jobSvc.GetJob();
                }
                
                private function getJobResult(event:Object):void{
                jobNameCB.dataProvider = event.result as ArrayCollection;
                }
                
                [Bindable]
                private var jobs:ArrayCollection = new ArrayCollection();
                
                private function jobHandler(event:ResultEvent):void{
                        jobs = event.result.catalog.job;
                        var jobObj:Object = new Object();
                        jobObj.name = "All";
                        jobObj.jobID = 0;
                        jobs.addItemAt(jobObj, 0);
                        jobNameCB.selectedIndex = 0;
                }
        ]]>
        </mx:Script>
        
        <!-- ColdFusion CFC (via AMF) -->
        <mx:RemoteObject id="jobSvc" destination="ColdFusion" 
source="PreTraffic.cfc.job" 
showBusyCursor="true">
                <mx:method name="GetJob"  result="getJobResult(event)"/> 
        </mx:RemoteObject>
        
        <mx:VBox label="Job History" width="100%" height="100%" x="10" y="92">
                        <mx:FormItem label="Job Name:">
                                        <mx:ComboBox id="jobNameCB" 
dataProvider="{jobs}" 
labelField="{data}">
                                        </mx:ComboBox>
                                </mx:FormItem>
                        </mx:Form>
                        <mx:HBox>
                                <mx:Button label="Search"/>
                                <mx:Button label="Clear"/>
                        </mx:HBox>
                        
                </mx:VBox>
</mx:Application>


Reply via email to