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]> 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] *On
> Behalf Of *Howard Fore
> *Sent:* Friday, November 07, 2008 10:41 AM
> *To:* [email protected]
> *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]> 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.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location:
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>
>
>
> --
> Howard Fore, [EMAIL PROTECTED]
> "The universe tends toward maximum irony. Don't push it." - Jeff Atwood
>
>
>
--
Howard Fore, [EMAIL PROTECTED]
"The universe tends toward maximum irony. Don't push it." - Jeff Atwood