I have 4 levels of tree:
- Reg1
-level 2
-level 3
-level 4
+level 2
+Reg2
level 2
level 3
level 4
level 2
+Reg3
level 2
level 3
level 4
level 2
+Reg4
level 2
level 3
level 4
level 2
I have implemented this using using struts2 jQuery JSTree plugin using JSON data.
If I select any child node (e.g.: Reg1 –> Level 2 –> level 3 –> level 4), when I try to collapse or expand the tree node which contains the selected child (level 4), it triggers the click event.
When I expand/collapse on the other nodes which are in a different hierarchy (Reg 2 or Reg 3 or Reg 4), then it won’t trigger the click event.
Is there anyway we can capture which element is clicked on the click event, so that if it’s an image with INS tag then I can skip my logic?
http://struts.jgeppert.com/struts2-jquery-showcase/index.action
Check out the
More widgets->Treepartuse the
onClickTopicsto catch the click eventExample
And you can get which element is clicked in the listen topic