Hi,
I have a list and a tree. Each time an item in the list is clicked, the tree should be filled with the appropriate data. (The list and tree are different cells in a tabview…)
I’m using this function:
$$("listView").attachEvent("onItemClick",function(id){
$$("tree1").clearAll();
if (id == 1){
$$('tree1').parse(tree_data1);
} else if (id == 2){
$$('tree1').parse(tree_data2);
}
$$("tabbar1").setValue("treeView");
});
It works fine the first time an item is clicked in the list (for each item). However, if I click on an item again, then the tree does not load the data correctly. It only loads the nodes from the top most level.
E.g. List with 2 items: A, B.
If I click on A, tree loads data for A. If I click on B, tree loads data for B. If I click on A again, it only loads top level nodes of data A.
Is this a bug or am I doing something wrong?
Thanks
Rael