The dataDescriptor’s purpose is to allow you to create a hierarchy out of flat data.
On 4/6/10 8:42 AM, "Phil Boissiere" <deletedfromyout...@yahoo.com> wrote: Thanks, Oleg, Jeff. In reality the thing that comes back after querying my database is an ArrayCollection of strongly typed objects (value objects?). These objects have a linear (non-hierarchical) structure but I want to use one of the properties (the "group" property) for the parent nodes in a Tree component. Should I be looking at creating a custom data descriptor or a custom object that implements the ICollectionView interface (does that mean create a custom Tree component?). I just want to make sure I'm doing the right thing, since either approach seems to involve quite a bit of ActionScript. Thanks again. --- On Tue, 4/6/10, Jeff <britton.j...@gmail.com> wrote: From: Jeff <britton.j...@gmail.com> Subject: [flexcoders] Re: Using an ArrayCollection to populate a Tree component To: flexcoders@yahoogroups.com Date: Tuesday, April 6, 2010, 7:18 AM You can also create a custom data descriptor and set the dataDescriptor property of the tree component. See http://livedocs. adobe.com/ flex/3/html/ help.html? content=about_ dataproviders_ 6.html <http://livedocs.adobe.com/flex/3/html/help.html?content=about_dataproviders_6.html> --- In flexcod...@yahoogro ups.com </mc/compose?to=flexcoders%40yahoogroups.com> , Oleg Sivokon <olegsivokon@ ...> wrote: > > The best way would be to implement your own ICollectionView, however, this > would be a complex task. > For your example, I'd do it like so: > > private var ac:ArrayCollection = new ArrayCollection( [ > { "Animals": ["dog", "cat"], > { "Fruits": ["orange", "apple"] } > ]); > > > Best. > > Oleg > -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui