I am using a flex tree and I want to make a call to HTTP service when user selects one of the items in the tree. I have an XML something like this.
<group label="FlexCoders"> <user label="abc" id="123"/> <user label="def" id="456"/> </group> <group label="FlexDev"> <user label="ghi" id="123"/> <user label="jkl" id="456"/> </group> I pass this XML to a tree <mx:Tree id="myTree".... click="postData()" labelField="@label"/> Now when the user clicks on one of the items I try to fetch myTree.selectedItem.id and send it to a HTTPService. Unlike Datagrid, this does not work for the tree and I am not getting any values for id. Is there any way I could get the value of id for the selected tree element. Any help would be grealty appreciated. TIA, Gaurav