1
votes

I'm currently working with a tree of devices using an ArrayCollection to define the tree nodes. I'd prefer to use an actual tree data type composed of custom objects (each defining how to render themselves, their right click menu etc.) and have the tree display that. Can anyone suggest how to achieve that?

Thank you, Fred

1
You should probably look at the HierarchicalData and HierarchicalCollectionView basically these allow you to wrap a collection of custom objects and specify that some property is used to store sub-collections (believe it defaults to "children" if not specified) - shaunhusain
Did you try setting the dataProvider of the <Tree> tag as an XMLList collection? From what I understand using Tree in conjunction with XMLLIst and overriding functions of the tree class you can achieve what you want. - Neeraj

1 Answers

0
votes

If you are planning to do loads of customisation on the mx tree .. You will end up writing loads of work arounds for simple things . mx tree component has known bugs ...which were never resolved .

Better way of doing it would be to create ...your own spark based tree component there is a very good example by Saturn boy @http://saturnboy.com/2011/09/spark-treelist/