Pass ArrayCollection from ColdFusion to Flex (using BlazeDS)

When pushing ColdFusion objects on Flex through BlazeDS and mapping classes using RemoteClass ...

[RemoteClass(alias="blah.blah")] 

... is it possible that ColdFusion Arrays (or some Java equivalent) are automatically mapped to ActionScript ArrayCollections?

This guy almost had it, but not quite:

http://www.richinternet.de/blog/index.cfm?mode=entry&entry=33CF66A4-DC95-6312-95EFE8E3DB31D298

+6
flex actionscript coldfusion arraycollection blazeds
source share
4 answers

After upgrading to CF 9.0.1 and BlazeDS 4, I finally got the answer to this question.

Now you can use the following node in your service-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

+1
source share

For what it's worth, the ColdFusion Query object is directly and automatically mapped to an ArrayCollection. Therefore, if this is an option, you can manually create a request object and return it from your service.

+1
source share

I just stumbled upon this article on serialization through java. I have yet to try this (I hope today and today). Hope this helps some.

0
source share

From Java to Flex, the list (Java) is displayed directly in ArrayCollection (AS3).

Here you can see the full list. http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=serialize_data_2.html

0
source share

All Articles