Hey Malcolm. Well CFC's generally only accept datatypes they understand: boolean, string, numeric, array, struct, etc...
This article may give you a head start: http://www.flexingcfmx.com/index.cfm?mode=entry&entry=D36D5CE5-FB00-283B-A23A89CB46949A4D Malcolm wrote: >Hi yo'll > >I am using Remote Objects (definitely the way to go) with ColdFusion 7 >(CFC). I have no problems passing strings to a CFC but can't seem to be able >to use Value Objects, is this possible? > >Or put another way can a CFC argument be of the type Object? Using example >code from the Cairngorm login sample, this is the object I am passing to the >CFC. > >---- LoginVO.as ---- > >import org.nevis.cairngorm.vo.ValueObject; >class com.company.product.vo.LoginVO implements ValueObject >{ > public function toString() : String > { > var s : String = "LoginVO[username="; > s += username; > s += ", password="; > s += password; > s += ", loginDate="; > s += loginDate; > s += " ]"; > return s; > } > > public static var registered:Boolean = Object.registerClass( " >com.company.product.vo.LoginVO", LoginVO ); > > public var username : String; > public var password : String; > public var loginDate : Date; >} > >----- CFC ---- > ><cfcomponent displayname="LoginService"> > > <cffunction name="login" output="false" access="remote"> > > <cfargument name="loginVO" required="yes" default=""> > > <!--- THIS DOESN'T WORK ---> > <cfset username = loginVO.username> > > </cffunction> > ></cfcomponent> > >---- Generates the following CF Error ---- > >Error Type: Expression >Message: You have attempted to dereference a scalar variable of type class >java.lang.String as a structure with members. > >----- > >Something wrong with the way I am accessing the loginVO.username value? Do I >need to perform a deep copy of the object or something like that? > >Any thoughts appreciated. > >Regards, >Malcolm > > > > > >-- >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 > > > > > > > > > -- 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/ <*> 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/

