Hi Rob,
Some things to try.
First note that when you use mx:arguments the arguments are positional,
i.e., 'typer' would match getSearch parameter 1 and 's1' would match
getSearch parameter 2. The names are not matched.
In your getSearch function try dumping whatever arguments are being sent to
see if anything is, e.g.
<cfset s="">
<cfloop index="i" from= "1" to="#arraylen(arguments)#">
<cfset s=s & '|' & arguments[i] >
<cfloop>
<cflog file="myfile" text="#s#">
When calling the rpc try adding send(), e.g.
getSearch.getSearch.send();
Instead of using mx:argumants, try calling the rpc with named arguments like
this:
getSearch.getSearch.send({typer:createVarsForSearch.typer,
s1:createVarsForSearch.sss1});
,
----- Original Message -----
From: "Rob Parkhill" <[EMAIL PROTECTED]>
To: "flex" <[email protected]>
Sent: Thursday, November 20, 2008 9:06 AM
Subject: Re: A Beginner Question
> David,
> Actually the cfc has the ability to take way more parameters, I was just
> trying to get two to work, and then add the rest. They are coming from a
> search form where the user can select a type of thing to search for, and
> then add up to three strings of information using and/or checkboxes
> between
> each string and then it also has a start and end date, and I am
> considering
> adding a limit to the results as the DB is large enough.
>
> But yes, your assessment is correct, I can just add the rest of the vars
> as
> soon as I know the formatting :)
>
> Thanks,
>
> Rob
>
> On Thu, Nov 20, 2008 at 8:50 AM, David Henry <
> [EMAIL PROTECTED]> wrote:
>
>> Rob,
>>
>> Just to be sure I understand, you have a cfc called getSearch.cfc in the
>> directory vo. vo is either on the web root or mapped in the coldfusion
>> administrator. getSearch.cfc has a function in it also called getSearch
>> which takes 2 parameters: typer and s1. Is this correct?
>>
>> <mx:RemoteObject
>> id="getSearch"
>> destination="ColdFusion"
>> source="vo.getSearch"
>> showBusyCursor="true"
>> fault="errorHandler(event)">
>> <mx:method name="getSearch" result="handleSearchResult(event)">
>> <mx:arguments>
>> <typer>{createVarsForSearch.typer}</typer>
>> <s1>{createVarsForSearch.sss1}</s1>
>> </mx:arguments>
>> </mx:method>
>>
>>
>>
>> David Henry
>> http://ColdFusionPowered.com/
>>
>>
>> Rob Parkhill wrote:
>> > That would be much appreciated... and I am sure that you can expect a
>> > few
>> > more questions from me. But it seems that with a couple of these
>> > simple
>> > things understood, I should be able to move forward at least...
>> > Thanks!
>> >
>> > On Wed, Nov 19, 2008 at 4:44 PM, David Henry <
>> > [EMAIL PROTECTED]> wrote:
>> >
>> >
>> >> I'm on my way out the door right now, I'll write up an answer for you
>> >> when I get home (unless someone beats me to it).
>> >>
>> >>
>> >> David Henry
>> >> http://ColdFusionPowered.com/
>> >>
>> >>
>> >> Rob Parkhill wrote:
>> >>
>> >>> David,
>> >>> Yup, remote object.. here's a code snippet. Not sure how to
>> >>> reference
>> >>>
>> >> the
>> >>
>> >>> form vars, like I said, nothing I was entering seemed to like me I
>> tried
>> >>>
>> >> to
>> >>
>> >>> write an AS function (that is what is here, well at least the
>> references)
>> >>> that was called by the submit button, but no go...
>> >>>
>> >>> <mx:RemoteObject
>> >>>
>> >>> id="getSearch"
>> >>> destination="ColdFusion"
>> >>> source="vo.getSearch"
>> >>> showBusyCursor="true"
>> >>> fault="errorHandler(event)">
>> >>> <mx:method name="getSearch" result="handleSearchResult(event)">
>> >>> <mx:arguments>
>> >>> <typer>{createVarsForSearch.typer}</typer>
>> >>> <s1>{createVarsForSearch.sss1}</s1>
>> >>> </mx:arguments>
>> >>> </mx:method>
>> >>>
>> >>> Rob
>> >>>
>> >>> On Wed, Nov 19, 2008 at 4:36 PM, David Henry <
>> >>> [EMAIL PROTECTED]> wrote:
>> >>>
>> >>>
>> >>>
>> >>>> Hi Rob,
>> >>>>
>> >>>> Welcome to Flex! What are you using to access the CFC?
>> >>>> RemoteObject
>> >>>> perhaps?
>> >>>>
>> >>>>
>> >>>> David Henry
>> >>>> http://ColdFusionPowered.com/
>> >>>>
>> >>>>
>> >>>> Rob Parkhill wrote:
>> >>>>
>> >>>>
>> >>>>> Good day,
>> >>>>>
>> >>>>> I have just started using Flex, as I think that it will suit my
>> current
>> >>>>>
>> >>>>>
>> >>>> app perfectly. I have found most of the information that I have
>> needed
>> >>>>
>> >> to
>> >>
>> >>>> get things going, but now I have come to a problem, and google is
>> >>>>
>> >> yielding
>> >>
>> >>>> no positive results. I would like to pass some form results to a
>> >>>> CFC
>> >>>>
>> >> for a
>> >>
>> >>>> datagrid. I have the CFC returning fine when I click the submit
>> button,
>> >>>>
>> >> but
>> >>
>> >>>> the arguments are not going in. I am not sure how to bind them or
>> pass
>> >>>>
>> >> them
>> >>
>> >>>> properly I guess.
>> >>>>
>> >>>>
>> >>>>> Any pointers would be greatly appreciated.
>> >>>>>
>> >>>>> Rob
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>
>> >>
>> >
>> >
>>
>>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5565
Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37