ColdFusion and Flex, composite CFCs, and Arrays

I have ran across this issue before and seem to have finally come across a solution. The issue: say I have a CFC called Person which has a property addressArray that is a array of Address CFCs. In my Flex app the associated object should have


But this does not work.


Will work though, but now I loose all that fancy schtuff in ArrayCollections, eh? So, in short the array does not translate into a ArrayCollection, but just a Array. Now this is expected behaviour, but how to get the ArrayCollection to work? Custom accessors and mutators! In modify the above to the below:

public function get addressArray():Object {
return _addressArray as ArrayCollection;
public function set addressArray( value:Object):void {
_addressArray = new ArrayCollection(value as Array);
var eventObj:Event = new Event("addressArrayChanged");



This entry was posted in ColdFusion, Flex, Techy. Bookmark the permalink.

One Response to ColdFusion and Flex, composite CFCs, and Arrays

  1. Kenny S. says:

    Great work. Big time saver here. Thanks Douglas.

Comments are closed.