Populate Tree using data from ArrayCollection

Posted by jtorrance on Stack Overflow See other posts from Stack Overflow or by jtorrance
Published on 2010-04-06T02:13:50Z Indexed on 2010/04/06 2:23 UTC
Read the original article Hit count: 282

Let's say I had an ArrayCollection like this:

        public var ac:ArrayCollection= new ArrayCollection([
            {item:"dog", group:"Animal"},
            {item:"orange", group:"Fruits"}, 
            {item:"cat", group:"Animal"},
            {item:"apple", group:"Fruits"}
            ]);

How would I create a Tree component in Flex 3 that uses the groups as nodes, with the appropriate items listed under each node?

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript-3