Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8836783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:34:23+00:00 2026-06-14T09:34:23+00:00

I have 4 levels of tree: – Reg1 -level 2 -level 3 -level 4

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:34:24+00:00Added an answer on June 14, 2026 at 9:34 am

    http://struts.jgeppert.com/struts2-jquery-showcase/index.action

    Check out the More widgets -> Tree part

    use the onClickTopics to catch the click event

    Example

    <sjt:tree 
                id="jsonTree" 
                href="%{treeDataUrl}"
                onClickTopics="treeClicked" 
            />
    

    And you can get which element is clicked in the listen topic

    $.subscribe('treeClicked', function(event, data) {
              var item = event.originalEvent.data.rslt.obj;
              alert('Clicked ID : ' + item.attr("id") + ' - Text ' + item.text());
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tree view representing certain items. This tree is always two levels
I have successfully implemented this method of using the Win32 API to set the
Have a tree menu made using nested ULs 3 levels deep. The bottoms 2
I have a tree structure that can be n-levels deep, without restriction. That means
I have a red-black tree (binary tree, all the leaves are within 2 levels).
First, is it possible to have n transactions levels over ADO.Net. Second, is this
I have a tree data structure that is L levels deep each node has
I have a really complicated elements tree being rendered, with a lot of levels
In mysql, I have a tree that is represented using the adjacency list model.
Wow. I have been asked to add a 3rd level to a tree menu

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.