I generate the first level node by “tree.loadXML(“main.do?m=getTreeInitXML”);”, the result is:
<?xml version="1.0" encoding="UTF-8"?>
A
and then, I want to use “tree.setXMLAutoLoading(“main.do?m=getTreeChildXML&type=” + type);” to get next level nodes. How can I get the type userData content when I click the current node. I know “tree.getUserData(nodeId, “type”)” can implement the function, but I don’t konw how to get the nodeId.
Hello,
there is onClink event handler.
tree.attachEvent(“onClick”,function(id){
var type = tree.getUserData(id, “type”);
})
But if you want to use type userdata in the dynamic loading process, you should set autoloading function (only in PRO edition):
tree.setXMLAutoLoadingBehaviour(“function”)
tree.setXMLAutoLoading(function(id){
…
})
Hi,
Were u able to fix ur problem? Can u help me on how u did it. I have similar issue for dynamic tree loading for the second level etc. And also in ur struts action ‘main.do’ how are u returning the XML?
Thanks
Monica