how to display treeview in jsp

Posted on 2007-03-31
Last Modified: 2011-09-20
Hi Experts,

I have a JSP page which will display a list in each column.
I have a BL list and Container List , 1 BL can contain 1 or morethan 1 containter.

I need to display these items in treeview using Javascript or JSP.

Ex:  +BL

and ones the user clicks on + sign
then it should be like


My Jsp code looks like

<display:column title="BL Number" property="blNumber" group="1" align="left" />
<display:column title="Container Number" property="containerNumber" align="left"/>      

right this will display like


Question by:gannev
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

mukhtar2t earned 250 total points
ID: 18830838
LVL 17

Assisted Solution

gops1 earned 250 total points
ID: 18831562
Try out this simple demonstration:

            <title>Script Demo Gops</title>
                        li ul{display:none;}
                        ul li{color:blue;text-decoration:underline;cursor:pointer}
                  <script type="text/javascript">
                        var oldMenu="";
                        function showHide(obj){
                              if(oldMenu) oldMenu.childNodes[1].style.display='none';
                              if(oldMenu==obj) {oldMenu=""; return true;}
      <li onclick="showHide(this);">BL1
                  <li>Container 1 BL1
                  <li>Container 2 BL1
      <li onclick="showHide(this);">BL2
                  <li>Container 1 BL2
                  <li>Container 2 BL2

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This article discusses how to implement server side field validation and display customized error messages to the client.
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question