When pushing objects from ColdFusion to Flex via BlazeDS, and mapping the classes using RemoteClass...
[RemoteClass(alias="blah.blah")]
...is it possible to have ColdFusion "Arrays" (or some Java equivalent) automatically mapped to ActionScript ArrayCollections?
This chap nearly had it, but not quite:
http://www.richinternet.de/blog/index.cfm?mode=entry&entry=33CF66A4-DC95-6312-95EFE8E3DB31D298
For what it's worth, a ColdFusion Query object maps directly and automatically to an ArrayCollection. So if it's an option, you could manually create a query object and return that from your service.
After upgrading to CF 9.0.1 & BlazeDS 4, I finally have an answer to this.
You can now use the following node in you services-config.xml
<serialize-array-to-arraycollection>true</serialize-array-to-arraycollection>
Details here: http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS5B9C73A8-5FA2-4a54-B0C6-CECA2E20052D.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With