Ask a Question related to Coldfusion Flash Integration, Design and Development.
-
Jim Schell #1
Flash 8 combo box dataprovider using coldfusion 8 cfc
Hello group,
I am looking for information on how to set the dataprovider of a combobox in
flash 8 to the result of a cfc method of cfdirectory in coldfusion. I would
like this to be
dynamic in that when a user uploads a file to the website that the flash
combobox will hold the name of the file in it. My cfdirectory tag returns a
list of files based on
the paramters supplied, but I am unable to get the data from cfc into the
dataprovider. Any help you could give me would be greatly appreaciated.
The method is as follows and when I invoke this method on a cfm page I get a
list of zip files in the directory folder of the template so I know the
method works
<cffunction name="getAllZipFiles" access="remote" returnType="query"
output="true">
<cfdirectory action="list"
directory="#GetDirectoryFromPath(GetTemplatePath() )#" name="CurrentDir"
filter="*.zip">
<cfoutput query="CurrentDir">
#Name#<br>
</cfoutput>
<cfreturn CurrentDir>
</cffunction>
------------------------
I have a properly funtioning flash remoting setup so I know it is not that.
//Import the Flash Remoting Classes
import mx.remoting.Service;//import mx.remoting.NetServices;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;
import mx.remoting.RecordSet;
import mx.remoting.DataGlue;
//Connect to the Gateway
//Establish the Service
var myService : Service = new Service(
"http://localhost/flashservices/gateway",
new Log (Log.DEBUG),
"helloExamples.myRemote",
null,
null);
//Test the Connection
function getTestConn ()
{
//Create a PendingCall object
var testConn_pc : PendingCall = myService.getTestConn();
//Use the responder property to handle the success or failure
testConn_pc.responder = new RelayResponder (this, "getTestConn_Result",
"getTestConn_Fault");
}
//Handle the Success
function getTestConn_Result (re : ResultEvent)
{
//trace(re.result);
capText.text = re.result
//call the tabs query
//getTabs();
//getMyRules();
getZipFiles();
}
//Handle the Failure
function getTestConn_Fault (fault:FaultEvent):Void
{
trace ("error");
}
--------------------
I get an error that the data returned is not of a list type even though the
returnType is set to query when I test the movie.
12/25 20:37:6 [DEBUG] : helloExamples.myRemote.getAllZipFiles() returned
{code: "Server.Processing",
description: "The value returned from the getAllZipFiles function is
not of type list.",
details: "",
level: "error",
rootcause: {code: null,
description: "The value returned from the getAllZipFiles function
is not of type list.",
details: "",
level: "error",
type: ""},
type: ""}
--------------------
Here is the actionscript function for the combobox
//get all the zip files in the current directory
function getZipFiles ()
{
var ZipFiles_pc : PendingCall = myService.getAllZipFiles();
ZipFiles_pc.responder = new RelayResponder (this, "getZipFiles_Result",
"getZipFiles_Fault");
}
function getZipFiles_Result (re : ResultEvent)
{
DataGlue.bindFormatStrings(myCombo_cb,re.result,"# name#","#name#")
}
function getZipFiles_Fault (fault:FaultEvent):Void
{
trace ("error");
}
Jim Schell Guest
-
MySQL PHP Flash and the Combo Box
I'm in the process of expanding an admin area for a website (coded with PHP and MySQL) and would like to get my client list into a flash combo box.... -
flash ph mysql combo box
hey. need some help please. ive managed to get info from a mysql database into flash in a combo box. i have a text field and i want it to load in... -
Urgent CFGrid-Combo-DataProvider Question
Dear all, I have this code to create combos in cfgrid. My question now is .. how to replace the hardcoded countries with query? The code is saved... -
cfc and flash combo box
Hello all, I have written a very simple web service in cold fusion that queries a date field from a colum in a db2 database and dynamically... -
dreamweaver flash combo
i am building a site which uses a simple flash nav bar with html (dreamweaver) text, pages and frames. is there a way that i can use flash...



Reply With Quote

