Jstree code –
$("#jstree").jstree({
"json_data" : {
"ajax" : {
"url" : "Servlet?action=view&docId=100,
}
},
});
Now, what is happening is when I expand any of the leaf node then the whole tree builds under that.
The same problem is also observed here – http://www.jstree.com/documentation/json_data#demo2
Try to expand the “Only Child” node and the whole tree builds under that.
Can I remove the ajax request from node expanding because in my case all the tree is loaded at once.
You should use
state:leaffor nodes that do not open.every time you open a node in jstree it fires an ajax request with the opened node parameters so you get an infinite tree.