Hi Rob,

vars you declare within a function are only available within that function.

here is a simple example of how to pass the information:


private function doSearch():void {
    remoteService.getSearch();
}

....

<mx:RemoteObject
      id="remoteService"    <---name changed to make it clearer
      destination="ColdFusion"
      source="vo.getSearch"
      showBusyCursor="true"
      fault="errorHandler(event)">

    <mx:method  name="getSearch" result="handleSearchResult(event)">
        <mx:arguments>
            <typer>{searchType.text}</typer>
            <s1> {ss1.text}</s1>
       </mx:arguments>
    </mx:method>
</mx:RemoteObject>

....
<mx:formItem label="Search Type:">
    <mx:TextInput id="searchType" />
</mx:formItem >

<mx:formItem label="Search String:">
    <mx:TextInput id="ss1" />
</mx:formItem>

....
<mx:Button label="Search" click="doSearch()" >



----- Original Message ----- 
From: "Rob Parkhill" <[EMAIL PROTECTED]>
To: "flex" <[email protected]>
Sent: Thursday, November 20, 2008 4:43 PM
Subject: Re: A Beginner Question


> thanks Bob,
> I have added the logging and your method of passing the vars to the CFC 
> and
> I am getting nothing passed to the CFC.  Should I have to create a handler
> to do that form transformation?  or is there a way to reference the form
> vars directly... Sorry action script is new to me, but it seems like it 
> will
> be the best solution for my current application.
>
> Let say that I have a form with a Radio group, three text input boxes, 
> four
> check boxes, and two date choosers. (which  is exactly what I have)  what 
> is
> the best way to pass that information to the CFC.
>
> Here is my AS for the createVarsForSearch function:
>
> public function createVarsForSearch():void{
> var sss1:TextInput;
> var sss2:TextInput;
> var sss3:TextInput;
> var and1:CheckBox;
> var or1:CheckBox;
> var and2:CheckBox;
> var or2:CheckBox;
> var typer:RadioButtonGroup;
> var typer = searchType; //Search Type
> var sss1 = ss1; //Search String 1
> var and1 = a1;// And Function
> var or1 = o1; // Or Function
> var sss2 = ss2;
> var and2 = a2;
> var or2 = o2;
> var sss3 = ss3;
> getResults();
> }
>
> Thanks for any assistance!
>
> 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:5567
Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to