1 Reply Latest reply on Jul 4, 2011 9:25 AM by shahinyan

    Flex 4.5 Mobile ColdFusion integration newbie question


      Dear friends,

      i am struggling to connect my simple Flex project to CF cfc. Here is the Flex part:


      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
              xmlns:s="library://ns.adobe.com/flex/spark" title="Photo Upload" creationComplete="photoUploadService.getUsers.send();">
              <!-- Place non-visual elements (e.g., services, value objects) here -->
              <s:RemoteObject id="photoUploadService" destination="ColdFusion" source="cfc.upload" endpoint="http://www.smalltheater.am/flex2gateway">
                  <s:method name="getUsers" result="getUsersResultHandler(event)"  />
                  import flash.sensors.Geolocation;
                  import mx.collections.ArrayCollection;
                  import mx.rpc.events.ResultEvent;
                  private var usersCollection:ArrayCollection;
                  private function getUsersResultHandler(event:ResultEvent):void{
                      usersCollection=event.result as ArrayCollection;
          <s:VGroup x="21" y="23" width="200" height="200">
              <s:DataGrid id="testData" dataProvider="{usersCollection}"/>


      ColdFusion component: upload.cfc

      <cffunction name="getUsers" access="remote" returntype="query">
      <cfquery datasource="#application.dsn#" name="qUsers">
      SELECT * FROM farUsers
      <cfreturn qUsers/>


      when i am trying to debug my arrayCollection i am getting null.


      What i am doing wrong? Please help.


      P.S. crossdomain.xml set to allow all connections on www.smalltheater.am