I too am having problems send complex datatypes too coldfusion, please let me know if you find a solution.
Thank you, Sean --- In [email protected], Kai Pradel <[EMAIL PROTECTED]> wrote: > > Hi all, > > I have been trying to use Remote-Object to pass complex data types from > Flex to ColdFusion - to no avail. Simple arrays and strings can be > passed easily, but as soon as I send an object all hell breaks loose. > > I am running ColdFusion 7 (updater 3) on Win2K with Flex 1.5 (all on one > machine) using Apache 2. > > If anyone has a working example on how to pass complex data types to > ColdFusion that shows how I can read them out as argument.passedinobject > I would greatly appreciate your help. > > Here is the situation: > I am wrapping annotationdata into a shell object which is sent to a > ColdFusion component. Using the debugger, I can see that the correctly > formatted object is sent out. However, ColdFusion responds with "unknown > error" if I try to access the passed in data. > > I don't get an error if I don't set a datatype or required to yes. > However, I am also unable to access the passed in object. > > Thanks, > Kai > > > Flex Code: > ============================================================== > ============================================================== > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" > creationComplete="addData();"> > > <mx:Script> > <![CDATA[ > var shellObject:Object = new Object(); > > var annotationdata:Array = new Array(); > > var dataObj:Object = new Object(); > var dataObj1:Object = new Object(); > > function addData() { > > dataObj.timestamp = 123; > dataObj.annotation = "this is a string "; > > dataObj1.timestamp = 456; > dataObj1.annotation = "this is another string"; > > > annotationdata.push(dataObj); > annotationdata.push(dataObj1); > > shellObject.myArgument = annotationdata > > filemanagerfunctions.myFunction(shellObject); > } > ]]> > </mx:Script> > > <mx:RemoteObject id="filemanagerfunctions" > endpoint="http://192.168.168.1/flashservices/gateway" > fault="mx.controls.Alert.show('hello!')" > source="mediasilodev.components.helloworld" showBusyCursor="true"> > > <mx:method name="myFunction" result="alert(event.result)" /> > > </mx:RemoteObject> > > > </mx:Application> > > > > > ColdFusion Code: > ============================================================== > ============================================================== > <cfcomponent> > <cffunction name="myFunction" access="remote" returntype="string"> > <cfargument name="myArgument" required="no"> > <cffile > action = "write" > file = "d:/Inetpub/Webroot/mediasilodev/output.html" > output = "#arguments.myArgument.data1#"> > <cfreturn "Got something"> > </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/ <*> 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/

