views:

552

answers:

4

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

+1  A: 

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.

Adam Tuttle
A: 

i just stumbled on this article on serialization via java. I have yet to try this (hopefully later today). Hopefully it helps some.

ethyreal
A: 

From Java to Flex a List (Java) maps directly to an ArrayCollection (AS3).

You can see a full list here. http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs%5FParts&file=serialize%5Fdata%5F2.html

jonbcampos
A: 

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

stubotnik