I have two questions regarding jsTree:
-
I am generating a jsTree using JSON with struts2. At the first time tree displayed correctly. But on the button click I want to reload that tree with different data into the same div. On the button click I am giving the same action name which is given to the first time to generate jstree.
-
If I am clicking on any node of the tree then I want an id of that node and if that node has any parent then also want a parent node id of that node again parent node has parent then id of that parent node also
Example
Parent 1
|__Parent 2
|__Child 1
I am clicking on Child 1 then I want id of Child 1, Parent 2, Parent 1 and so on.
If you want to get the full path to your node you can use get_path
Full example
Will return /parent 1/parent 2/Child 1