Here is my code, perhaps this will help

AS3 Class
package com.desktopae.vo{
        import com.adobe.cairngorm.vo.ValueObject;
        import mx.collections.ArrayCollection;
        
        [Bindable]
        [RemoteClass(alias="desktopae.cfc.vo.Lender")]
        public dynamic class Lender{
                public var lenderID:Number; //ONLY returned by Server
                public var lendername:String;
                public var lenderURL:String;
                public var lenderlocations:ArrayCollection;             
                public var selectedLocation:LenderLocation;
                
                public function Lender(){

                }
                
                public function addLocation(location:LenderLocation):void{
                        lenderlocations.addItem(location);
                }
                
                public function removeLocation(location:LenderLocation):void{
                        var index:Number = 
lenderlocations.getItemIndex(location);
                        lenderlocations.removeItemAt(index);
                }
                
        }
}

CFC
<cfcomponent displayname="Lender" hint="Corresponds to AS Class,
com.desktopae.vo.Lender">
        <!---Properties--->
        <cfproperty name="lenderID" type="numeric" default="0">
        <cfproperty name="lendername" type="string" default="">
        <cfproperty name="lenderURL" type="string" default="">
        <cfproperty name="lenderlocations" type="array" default="ArrayNew(1)">
        <cfproperty name="selectedLocation"
type="desktopae.cfc.vo.LenderLocation">
        
        <!---Initialize VARs--->
        <cfscript>
                THIS.lenderID = 0;
                THIS.lendername = "";
                THIS.lenderURL = "";
                THIS.lenderlocations = ArrayNew(1);
        </cfscript>
        
        <cffunction name="populate" access="public" output="false"
returntype="Lender">
                <cfargument name="lenderID" type="numeric" required="yes">
                <cfargument name="lendername" type="string" required="yes">
                <cfargument name="lenderURL" type="string" required="yes">
                
                
                <!---Set Values--->
                <cfscript>
                        THIS.lenderID = ARGUMENTS.lenderID;
                        THIS.lendername = ARGUMENTS.lendername;
                        THIS.lenderURL = ARGUMENTS.lenderURL;
                        THIS.lenderlocations = ArrayNew(1);
                </cfscript>
</cffunction>
</cfcomponent>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to