View Full Version : flex 2 query result from cfc
07-23-2006, 05:10 AM
have just started getting into flex 2 and have a quick question. In the example i'm looking at to get flex 2 and coldfusion playing nice with each other the CFC returns a query to flex.
Can you return a recordSet to flex in the same manner as you can with flash remoting, or does it require additional parameters.
07-23-2006, 04:26 PM
Absolutely. In fact, I think it is MORE intuitive than AS 2.0 ever was.
Here's some sample code...
In Flex, you write some code for a Remote Object.
<mx:RemoteObject id="myService" destination="ColdFusion"
Some new parameters are "showBusyCursor" which basically creates a ticking clock animation while the data is being retrieved. Way cool.
The "result" parameter maps to a corresponding Event Handler that you write inside two <mx:Script> tags.
The "id" parameter corresponds to the Actionscript 3.0 variable which you will use to actually call the component's function. So, for example, myService.getSomething();
There is a nice little article on this on adobe.com, provided by our developer friends. Check it out at: http://www.adobe.com/devnet/flex/articles/helloworld.html
big thanks to mantra for posting this question.
bigger thanks to lostinrecursion for posting the link. this has solved a number of problems i was facing.
mucho mucho gracias.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.