WeCodeThings Library
Library of code bits
Glossary    Contact Us
Need a web designer? visit WeCodeThings.Com for more details
Search  
   
Browse by Category

WeCodeThings Library .: Flex .: Flex 3 Get Data from a CFC ColdFusion using bindable result handler function



Flex 3 Get Data from a CFC ColdFusion using bindable result handler function

More about creating a remote object and passing an argument to a cfc from Flex 3 can be found at my blog post, HERE

Given you have a CFC that returns a query, you can create a resulthandler function that can then be binded to a datagrid.

<mx:Script>

<![CDATA[

import mx.collections.ArrayCollection;

import mx.controls.Alert;

import mx.rpc.events.ResultEvent;

[Bindable]

private var myReturnedData:ArrayCollection;

private function result(evt:ResultEvent):void {

myReturnData = evt.result as ArrayCollection;

}

 

<mx:RemoteObject id="mycfc"

destination="ColdFusion"

showBusyCursor="true"

source="cfctest.thecfc"

result="result(event)"

fault="fault(event)">

</mx:RemoteObject>

 

 

<mx:DataGrid id="mygrid" width="487" height="100%" dataProvider="{myReturnData}" />

 

 

<mx:Button label="Get All Names" id="btngrid" click="mycfc.returnallnames()"/>



How helpful was this article to you?

Related Articles

article Create Flex 3 Remote Object ColdFusion with Result and Fault Handlers for Flex 3
More about creating a remote object and...

(No rating)  4-28-2009    Views: 1426   
article Flex 3 Fault Message FaultString FaultCode FaultDetail Handler Flex 3
They are plenty ways to display the fault...

(No rating)  4-28-2009    Views: 857   
article ColdFusion Insert Data Statement Into a Table using ColdFusion CFC CFQueryParam
Be sure that when you type out the field...

  4-28-2009    Views: 1740   

User Comments

Add Comment
No comments have been posted.




.: Powered by Lore .:Code by WeCodeThings Website Design and Development