Paul,

 

I never tried complex objects with remoting but with FDS is quite easy (and it should be the same for remoting).

You define a “<cfproperty name=”mycollection” type=”Array”>” and in your AS3 class you set

“public var mycollection:ArrayCollection;” and everything is translated. For a relationship 1-to-1 you defined the type as <cfproperty name=”myRelatedObject” type=”my.cfc.path.to.file”> and to the same in your AS3 Class “public var myRelatedObject : myAS3ClassBindedToMyRelatedObject;”

 

João Fernandes

 


From: [email protected] [mailto:[email protected]] On Behalf Of Paul Hastings
Sent: domingo, 24 de Setembro de 2006 13:16
To: [email protected]
Subject: Re: [flexcoders] Re: Going Bananas, CFC to AS3 Class Mapping

 

> Only properties need to match and MUST be defined in the exact same order.

yeah i get that part. what i have works now just that you need to fill
the AS class once the data arrives.

using the remote object alias bit works for simple data, i'm not sure
how to handle complex stuff. what about a CFC object that is an array
of other CFC objects? suppose i have a CFC method that has a return
type of "mapLayers[]"? where mapLayers is an array of mapLayer CFCs.
right now i have:

[ArrayElementType("MapLayer")]
public var mapLayers:Array;

on the flex side & i just fill the mapLayers array w/the mapLayer
objects (create a new one & fill it for each mapLayer in the array)
when the data comes over. is there a better way?

thanks guys.

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to