|
Mailing Lists
|
Home / Groups / Adobe Flex
connecting Flex & ColdFusionHi, I am trying to connect CF & Flex with remoting. I got flex set up for remoting, and I have this flex code: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApp()"> <mx:Script> <![CDATA[ import mx.rpc.events.ResultEvent; import mx.collections.ArrayCollection; [Bindable] private var acArtists:ArrayCollection; private function initApp() :void { ArtistGateway_RO.getArtist(); } private function getArtistsRO_Handler(event:ResultEvent):void { acArtists = ArrayCollection(event.result); } ]]> </mx:Script> <mx:RemoteObject id="ArtistGateway_RO" destination = "ColdFusion" source ="com.cfcs.ArtistGateway"> <mx:method name="getArtists" result = "getArtistsRO_Handler(event)" /> </mx:RemoteObject> <mx:DataGrid dataProvider = "{acArtists}" right="10" left="10" top="10" bottom="10"> </mx:DataGrid> </mx:Application> my cfc is located in localhost/com/cfcs/ArtistgateWay.cfc <cfcomponent output="false"> <cffunction name="getArtists" access="remote" returntype="query"> <cfset var qRead = "" /> <cfquery datasource="cfartgallery" name="qRead"> SELECT artistid, firstanme, lastname, email FROM artists </cfquery> <cfreturn qRead /> </cffunction> </cfcomponent> when I run the appication I get an flash player error saying can't find coldfusion component? Am I doing something wrong? Flex is looking at com as http://localhost/com right ? Thanks so much, Johnny |
February 11, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||