Passing an ArrayCollection from ColdFusion to Flex (with BlazeDS)
Asked Answered
B

4

6

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

Bethel answered 28/7, 2009 at 9:16 Comment(0)
B
1

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

Bethel answered 27/9, 2010 at 15:58 Comment(0)
S
1

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.

Sense answered 28/7, 2009 at 17:23 Comment(0)
B
1

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

Bethel answered 27/9, 2010 at 15:58 Comment(0)
D
0

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

Daniel answered 29/7, 2009 at 15:21 Comment(0)
F
0

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_Parts&file=serialize_data_2.html

Formyl answered 9/12, 2009 at 15:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.