0 Replies Latest reply on Jul 8, 2011 12:15 PM by Emily LaMunyon

    Text Input Search to Data Grid Using CF Data Service?

    Emily LaMunyon



      I am new to Flex/Flash Builder 4 and am trying to create a simple page that allows the user to enter some search criteria and have the results disply in a data grid. I have connected to a coldfusion data source and would like the data to be pulled from my database. I have most of the code done, although I am still getting two errors around line 14 in the dataGrid_creationCompleteHandler function:

      1120: Access of undefined property getCORNER_REPORTS_Doc

      1136: Inocorrect number of arguments. Expected 1.


      I am stumped, any help would be greatly appreciated!


      <?xml version="1.0" encoding="utf-8"?>




      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:corner_reports="services.corner_reports.*">





      import mx.controls.Alert;

      import mx.events.FlexEvent;

      import valueObjects.CORNER_REPORTS_Doc;


      protected function dataGrid_creationCompleteHandler(event:FlexEvent):void





      protected function button_clickHandler(event:MouseEvent):void


      getCORNER_REPORTS_DocResult.token = corner_Reports.getCORNER_REPORTS_Doc(text.text);









      <s:CallResponder id="getCORNER_REPORTS_DocResult" result="getCORNER_REPORTS_Doc = getCORNER_REPORTS_DocResult.lastResult[0]

      as Corner_Reports"/>


      <corner_reports:Corner_Reports id="corner_Reports" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>


      <!-- Place non-visual elements (e.g., services, value objects) here -->




      <s:TextInput x="50" y="40" id="text"/>


      <mx:DataGrid x="50" y="117" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{getCORNER_REPORTS_DocResult.lastResult}" id="dg">




      <mx:DataGridColumn headerText="Column 1" dataField="col1"/>

      <mx:DataGridColumn headerText="Column 2" dataField="col2"/>

      <mx:DataGridColumn headerText="Column 3" dataField="col3"/>



      <s:Button x="231" y="40" label="Button" id="button" click="button_clickHandler(event)"/>