House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / Adobe Flex

A Beginner Question

Author:
Bob Keleher
11/21/2008 11:56 AM

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()" > > 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


Search flex

February 11, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29