Yeah but in cairngorm, I have to pass the N number of variables from the view, to the event, to the command, to the delegate, then to the cfc. So if I can do it in a Object, I only have to pass one thing around and then in the cfc ref by objectName.Fieldname
I have seen other people looking for how to do this and I did see something about using a wrapper object around the object you want, but that did not make any sense to me. _____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Howard Fore Sent: Friday, November 07, 2008 11:45 AM To: [email protected] Subject: Re: [flexcoders] sending a Flex Object() to a cfc On my search forms I just send plain strings back to the CFC. In Actionscript: publicationsRO.searchPublicationArticles( pubId, fromDate, toDate, contentSourceId, contentIsPublished, searchText ); And then in the CFC: <cffunction name="searchPublicationArticles" output="false" access="remote" returntype="query"> <cfargument name="pubId" type="numeric" required="true"/> <cfargument name="startDate" type="date" required="false" /> <cfargument name="endDate" type="date" required="false"/> <cfargument name="contentSourceId" type="numeric" required="false"/> <cfargument name="articleHasBeenPublishedPreviously" type="boolean" required="false" default="false" /> <cfargument name="searchText" type="string" required="false" default="" /> <cflog file="epublisher" text="publicationListener :: ****** ****** ****** ****** ****** ****** ****** ****** " /> <cflog file="epublisher" text="publicationListener :: searchPublicationArticles : START" /> <cfloop collection="#arguments#" item="argumentName"> <cflog file="epublisher" text="publicationListener :: searchPublicationArticles : #argumentName# = #arguments[argumentName]#" /> </cfloop> <cfreturn variables.publicationService.searchForPublicationArticles( arguments.pubId, arguments.startDate, arguments.endDate, arguments.contentSourceId, arguments.articleHasBeenPublishedPreviously, arguments.searchText ) /> <cflog file="epublisher" text="publicationListener :: searchPublicationArticles : END" /> <cflog file="epublisher" text="publicationListener :: ****** ****** ****** ****** ****** ****** ****** ****** " /> </cffunction> On Fri, Nov 7, 2008 at 11:29 AM, Darrin Kay <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ing.com> wrote: Yeah I can create a VO.cfc but since there is no need to keep what is sent. Think of it as a search option, (from date, to date, state and so forth) so they are 8 simple values. Is there another way to create the object in Flex, another data type I should use? _____ From: [EMAIL PROTECTED] <mailto:[email protected]> ups.com [mailto:[EMAIL PROTECTED] <mailto:[email protected]> ups.com] On Behalf Of Howard Fore Sent: Friday, November 07, 2008 10:41 AM To: [EMAIL PROTECTED] <mailto:[email protected]> ups.com Subject: Re: [flexcoders] sending a Flex Object() to a cfc Have you tried creating an Actionscript class for objectName (in your code) instead of a generic object and then use a RemoteAlias directive to associate that .as class to a CFC? I know this works from CF to Flex, I'm not certain about the other way. What I'd love to do is to send an ArrayCollection from Flex back to CF where it could be manipulated as a query. On Fri, Nov 7, 2008 at 8:09 AM, btroop202 <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ing.com> wrote: I am trying to send a flex Object to a cfc but getting a error message. So if I define my object: var objectName:Object = new Object(); objectName.field1 = 'someData'; objectName.field2 = 'someData'; objectName.field3 = 'someData'; Then in the cfc I am looking for a struct, but I get this error message : coldfusion.runtime.MissingArgumentException: The parameter objectName to function cfcName is required but was not passed in. So I would think that this should be very simple but having a hard time with it. Thanks ------------------------------------ -- Flexcoders Mailing List FAQ: http://groups. <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share. <https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e6 2079f6847> acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail- <http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo> archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links (Yahoo! ID required) mailto:flexcoders-fullfeat <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] -- Howard Fore, howard.fore@ <mailto:[EMAIL PROTECTED]> hofo.com "The universe tends toward maximum irony. Don't push it." - Jeff Atwood -- Howard Fore, howard.fore@ <mailto:[EMAIL PROTECTED]> hofo.com "The universe tends toward maximum irony. Don't push it." - Jeff Atwood

