In your result method of your Command class try this:

var arr:Array = data.result as Array;
modelLocator.acDept = new ArrayCollection( arr );

DJM
                        
--- In [email protected], "markflex2007" <[EMAIL PROTECTED]> 
wrote:
>
> Hi,
> 
> I have a simple cfc, the function is like this,it get a department 
> list
> 
> <cffunction name="getDept" displayname="getDept" access="remote" 
> output="false" returntype="query">
>       
>       <cfquery name="getDepartment" datasource="bursary">
>                        SELECT Id, Dept 
>                        FROM tlkpDept
>        </cfquery>
>        
>        <cfreturn getDepartment />
>       
> </cffunction> 
> 
> 2.This is the modellocator .I want to save department list to the 
> acDept (ArrayCollection)
> 
> 
> 
> public class  BursaryModel implements IModelLocator {
>               
>                
>               private static var instance:CESFBursaryModel;
>          
>           ...
>           public var acDept : ArrayCollection;
>           
>           ...
>           }
>           
> 
> 3.This is the Delegate function. this  builds a flex function 
getDept
> ()
> 
> 
>              public function getDept():void {
>                        
>                       var call:Object = this.service.getDept();
>                       call.addResponder(responder);
>                        
>               }
>               
>               
> 4.This is part of the command class 
> 
> public function result( event:Object ):void {
>                        
>                       ...
>                        modelLocator.acDept = event.result;
>                         ...
>                        
>                        
>               }
>               
> 5 the view page, bind the 
> 
>               ...
>               private var modelLocator:BursaryModel = 
> CESFBursaryModel.getInstance();
>               ...
>               
>               <mx:ComboBox x="440" y="268" width="142"  
> dataProvider="{modelLocator.acDept}" /> 
>               
> 
> my error is I get a list and it looks like.
> 
> [object Object]
> [object Object]
> [object Object]
> [object Object]
> 
>  
>  
>  but I want to show the dapartment list,Please help me and give me 
a 
> hit how to fix this.
>  
>  I do not know what the event.result is command class and how to 
> convert is to a real department list.
>  
>  
>  Thanks for your help
>  
>  
>  Mark
>


Reply via email to