No, not that I've found.  But it's simple to inflate the generic
objects into typed objects in AS.  Just add a static
createFromProperties(o:Object):AddressBook method that will copy
properties from the passed object into a new instance of the strongly
typed object, and then when you get your ArrayCollection in Flex, loop
over the elements and inflate each one.

var ac:ArrayCollection = event.result;
for (var i:int = 0; i < ac.length; i++) {
  ac[i] = AddressBook.createFromProperties(ac[i]);
}

It's not really elegant, but it's simple, and mandatory with how slow
CF is at creating CFC instances.

cheers,
barneyb

On Feb 19, 2008 12:05 PM, Gareth Arch <[EMAIL PROTECTED]> wrote:
> Argh!  For some reason I skipped completely over that part.  Other than 
> having to use createobject, do you know of anything that will just return the 
> properties rather than the whole shebang (in CFMX7)?  I've returned the data 
> as a query before, but that then requires manipulation on the ActionScript 
> side of things, so if there was a way to tell it "this is an AddressBook" 
> from CF, that would be extremely useful (without going through LiveCycle).  
> Thanks for the help.
>
> >How are you calling it from Flex?  __type__ only works with FDS, I
> >believe, not with remote objects.
> >
> >cheers,
> >barneyb
> >
> >On Feb 19, 2008 10:54 AM, Gareth Arch <[EMAIL PROTECTED]> wrote:
> >>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299352
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to