For a tree defined like so (treeData is an XMLListCollection):
<mx:Tree showRoot="false" dataProvider="{treeData}"
itemOpen="onTreeItemOpened(event)"/>
I use code similar to the following to determine which root node was
opened.
private function onTreeItemOpened(event: TreeEvent) : void {
if (event.item == treeData[0].children()[0]) {
// the first root node, index 0, was opened
}
else if (event.item == treeData[0].children()[1]) {
// the second root node, index 1, was opened
}
}
--- In [email protected], nhid <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a tree with multiple root nodes, where the leaves will be
populated
> only when I click on the folder icon using the itemOpen event. That
call
> needs to pass the information of that particular root node to the
backend,
> how do I detect which root node I clicked?
>
> Thank you!
>