Thanks Paul. This seems to be a complex project and I am having a hard time following it. I wish they had a simple example. But I am still experimenting with ValueObject.cfc and hope I can get this done pretty soon.
--- Paul Kenney <[EMAIL PROTECTED]> wrote: > At work we figured out how to do this a little while > back for the > Tartan Framework (http://www.tartanframework.org). > If you download the > code, take a look at the file > /tartan/vo/ValueObject.cfc, and in > particular the getFlashRemotingData() and > setFlashRemotingData() > methods. > > > > > > > On Thu, 24 Mar 2005 10:37:27 -0800 (PST), Mohanraj > Jayaraman > <[EMAIL PROTECTED]> wrote: > > Hi Dirk, > > > > Thanks for your suggestion. But my condition > differs > > from your example. > > > > Lets assume I had an AS Class 'MyClass.as' > > I am trying to do something like this in my MXML > > var o:Object = new MyClass(); > > I build an 'array of structures' in MyClass > Object > > and I do pass the complex Object as input with > another > > Object wrapper. > > > > Here's an example by Macromedia on how exchange > > complex data > > > > > http://www.macromedia.com/devnet/flex/articles/complex_data_03.html > > > > According to macromedia > > When invoking methods remotely, you can pass > objects > > back and forth (as the methods' input parameters > and > > return value) between the client and the server. > > > > This example is explained with Java and I am > trying to > > replicate the same with Coldfusion CFC's. > > > > Thanks, > > Mohanraj > > > > > > > > --- Dirk Eismann > <[EMAIL PROTECTED]> > > > > wrote: > > > Hi Mohanraj, > > > > > > CF needs named parameters when dealing with > complex > > > types passed as CFC arguments. You have to wrap > the > > > object you want to send to the CFC into another > > > wrapper object. Inside the wrapper you define > > > properties for every named argument. This > should > > > work: > > > > > > // AS snippet > > > > > > // setup the object to be passed to the CFC > > > var o:Object = new Object(); > > > o.name = "Foo"; > > > o.date = new Date(); > > > o.otherData = [1,2,3,4,5]; > > > > > > // create a wrapper for the object > > > // input is the named argument of the CFC > > > var request = new Object(); > > > request.input = o; > > > > > > // send it > > > ro.sendComplexData(request); > > > > > > The wrapper's "input" property is also used to > > > identify the argument inside the CFC: > > > > > > <!--- CFC snippet ---> > > > <cffunction name="sendComplexData" > access="remote" > > > returntype="string"> > > > <cfargument name="input" type="struct" > > > required="yes" > > > > <cfreturn obj.name> > > > </cffunction> > > > > > > Dirk. > > > > > > > > > > -----Original Message----- > > > > From: Mohanraj Jayaraman > > > [mailto:[EMAIL PROTECTED] > > > > Sent: Thursday, March 24, 2005 3:12 AM > > > > To: flexcoders@yahoogroups.com > > > > Subject: Re: [flexcoders] How to pass AS > Objects > > > to a CFC > > > > > > > > > > > > > > > > Hi Clint, > > > > > > > > Thanks for your reply. I think i was not > clear > > > ealrier > > > > on my problem. Here's a sample code I am > dealing > > > with. > > > > > > > > Please note the property 'modarray' of the > 'pData' > > > > object. > > > > > > > > 'modarray' is populated with SelTP object _s > whcih > > > is > > > > an Array of Structures. Here I polupate the > _s > > > with > > > > selectedIndices of a data gris I am using. > > > > > > > > > > > > The required parameter 'MODARRAY' not passed > to > > > the > > > > function! is the message I get following my > > > > RemoteObject call > > > > > > > > Any idea what I am missing here. > > > > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Small Business - Try our new resources > site! > > http://smallbusiness.yahoo.com/resources/ > > > > > > Yahoo! Groups Sponsor > > > > ADVERTISEMENT > > > > > > > > ________________________________ > > 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 the Yahoo! > Terms of Service. > > > -- > Paul Kenney > [EMAIL PROTECTED] > [EMAIL PROTECTED] > http://www.pjk.us > __________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs 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/