I found this.
"Using ColdFusion in concert with the DataGrid component is a great way to
introduce the merits of the facade pattern. Most CF developers are quite
familiar working with recordsets in CF. While it is possible to pass
recordsets from ColdFusion to Flex, Flex is much happier working with arrays
of structures. First, the performance of arrays of structures is far
superior to recordsets in the Flash player. Second, while Flash Remoting can
accept a recordset from CF and even use it as a dataprovider for a DataGrid,
you will receive an error ("Unsupported type found in stream") upon trying
to pass the same structure back to ColdFusion via Flash Remoting. "
from
http://tomlink.net/blog/index.cfm?mode=cat&catid=7E72EF76-7E97-A3B0-E8BC2E4C92D891C7
But not sure I understand how to convert this from flash to cfform flash
action script. It seems that you have to convert the query to an array (did
that with the udf they suggest) and then assign the results to a new object
in your action script something like var employeelist = {};
And then use the new object holding the results to the grid like
gridname.dataProvider = employeelist;
But this does not work. It gives me an empty grid.
----- Original Message -----
From: "David Brown" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Tuesday, August 30, 2005 5:01 PM
Subject: Flash Remote with cfform
>I am trying to use flash remoting with a cfform and a cfrid on the flash
>cfform. I can send the grid data to the remote function and cfdump
>contents of the grid without any issues.
>
> But when I use another remote function to change the contents of the
> cfgrid and then try to call the same remote function again I get an error.
> unsupporrted type found in stream
>
> Everything works until I call the funtion to return another query to the
> grid. That functions works.. You see the new data in the grid, but when i
> try to send the new data i get the error.
>
> What is different about a grid that is first populated with a cfquery on
> page load and a cfgrid that has been updated with a remote cfc call?
>
> Here is the code I am using to send the contents of the cfgrid to the
> remote function.
>
> <cfsavecontent variable="SendGrid">
> <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>
> //put the controls in scope to avoid calling _root
> var qccteamgrid = qccteamgrid;
> var returnvalue = returnvalue;
> //make an object that will handle the response
> var responseHandler = {};
> returnvalue.text = "";
> //function that receives the response
> responseHandler.onResult = function( results: Object ):Void {
> //when results are back, populate the cfgrid
> returnvalue.text=results;
> }
> //function that receives any error that may have occurred during the call
> responseHandler.onStatus = function( stat: Object ):Void {
> //if there is any error, show an alert
> alert("Error while calling cfc:" + stat.description);
> }
> //get service. First parameter is path to component and
> //the second it's the object that will handle the response
> myService =
> connection.getService("flashservices.gateway.qccflashRemotingResponder",
> responseHandler );
> //make call
> myService.UpdateAttendees(qccteamgrid.dataProvider);
> </cfsavecontent>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216951
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54