When you get a query back from a CFC via the flexgateway, you should cast it as an ArrayCollection right there...
 
someFunction(event:EventResult):void {
    myArrayCollection = event.result as ArrayCollection;
}
 
Shan


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson
Sent: Thursday, July 27, 2006 12:13 AM
To: [email protected]
Subject: [flexcoders] How does Flex 2.0 handle ColdFusion Query results?

Hello All,

I finally got my Flex Remoting working properly, and now I am porting
all my Flash Applications over to Flex 2.0 as well as reusing all my
existing .CFC's (since they all worked fine for Flash Remoting).

The problem is, Flex 2.0 doesn't properly display my data - for example,
in my DataGrid control, when I set my dataProvider property. The
dataProvider variable which is bound to the DataGrid, is cast as an
"ArrayCollection" - and of course, after I get the "result" of my
Remoting Call, I set the variable to "event.result As Array".

This code works fine, for another Remoting project I am working on - but
in that project, I am sending "Typed Objects" back and forth (which
reside both in the App itself, and the ColdFusion server).

Before I start posting code, I'd like to first begin this thread by
asking a general question:

How should I cast Flex 2.0 variables, that will contain "Query" Objects
(or RecordSet Objects, for you Flashers out there) returned from a
ColdFusion server?

I have a "Service Browser" program running, during execution of my Flex
App, and I am getting a valid Remoting Result back from the server.
It's basically an Array of Objects, with each Object containing
RecordSet Data.

Thanks in advance for any advice you can throw my way.

Mike


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/399 - Release Date: 7/25/2006

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/399 - Release Date: 7/25/2006

Reply via email to