0 Replies Latest reply on Nov 1, 2012 9:01 AM by kt03

    cftree

    kt03 Level 1

      hi,

       

      I download this code as the example from one of the website and play around to make sure it works before i can apply to my real project but i got error of " Error while calling cfc:Searvice flashRemotingResponder not found".  I am not sure but i do have flashRemotingResponder.cfc from the same root..  My guess could be the connection string but don't really understand it.  Can anyone can help me with this?

       

      Thanks

       

       

      <cfsilent>

      <cfsavecontent variable="getData">

      <cfoutput>

          //create connection

          var connection:mx.remoting.Connection = mx.remoting.NetServices.createGatewayConnection("http://#cgi.HTTP_HOST#/flashservices/gateway/");

          //declare service

          var myService:mx.remoting.NetServiceProxy;

      </cfoutput>

       

          var responseHandler = {};

       

          //put the controls in scope to avoid calling _root

          var categories = categories;

          var folder_home = folder_home;

         

          responseHandler.onResult = function( results: Object ):Void {

              //when results are back, populate the cftree

              categories.dataProvider = results;

              categories.setIcon(categories.getTreeNodeAt(0),folder_home.icon,folder_home.icon);

          }

        

          responseHandler.onStatus  = function( stat: Object ):Void {

              //if there is any error, show an alert

              alert("Error while calling cfc:" + stat.description);

          }

         

          //get service

          myService = connection.getService("flashRemotingResponder", responseHandler );

          //make call

          myService.getCategories();

         

          //change icons

          categories.setStyle("folderOpenIcon",folder_open.icon);

          categories.setStyle("folderClosedIcon",folder.icon);

          categories.setStyle("defaultLeafIcon",doc.icon);

          categories.setStyle("disclosureOpenIcon", arrowDown.icon);

          categories.setStyle("disclosureClosedIcon", arrow.icon);   

      </cfsavecontent>

      </cfsilent>

      <cfform name="myform" height="250" width="300" format="Flash" skin="haloSilver" timeout="300" >

       

          <cftree name="categories"><!--- an empty tree --->

          </cftree>

          <cfinput type="text" label="Selected Item:" name="display" bind="{categories.selectedNode.getProperty('id')} = {categories.selectedNode.getProperty('label')} " disabled="true" style="borderStyle:none;disabledColor:##000000">

          <cfinput type="button" name="getValues" value="Populate tree" style="borderThickness:0;corner-radius: 0;fill-colors: ##0066ff, ##00ccff;  theme-color: ##0099ff; color: ##ffffff;" onClick="#getData#">

       

              <cfinput type="Image" name="folder" src="images/folder.png" visible="false" height="0" width="0">

          <cfinput type="Image" name="folder_open" src="images/folder_open.png" visible="false" height="0" width="0">

          <cfinput type="Image" name="folder_home" src="images/folder_home.png" visible="false" height="0" width="0">

          <cfinput type="Image" name="doc" src="images/font_type1.png" visible="false" height="0" width="0">

          <cfinput type="Image" name="arrow" src="images/forward.png" visible="false" height="0" width="0">

          <cfinput type="Image" name="arrowDown" src="images/arrowDown.png" visible="false" height="0" width="0">

         

      </cfform>