The Flex Tree control is amazingly useful when building applications, especially if you're dealing with hierarchical data. To learn how to add the power of this intuitive organizational component to your developer's toolbox, keep reading.
To add our top level food groups we will employ an XMLList and data provider tags.
Here is the updated code for the Tree Control:
Pay close attention to the newly added labelField attribute of the Tree tag. This attribute tells the Tree to use the "label" attribute in the XMLList as the label for the tree. The XMLList is defined within the dataProvider tag. Note that we could have also used an Array instead of an XMLList. Well cover that shortly.