Solved

how to display treeview in jsp

Posted on 2007-03-31
4
1,868 Views
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
       +BL
       +BL

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

        -BL
           CONTAINER
           CONTAINER
           CONTAINER
       +BL
       +BL


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

BL1  CONT1
BL1  CONT2
BL2  CONT1
BL2  CONT2
 etc.,


Thanks,
Ganne
0
Comment
Question by:gannev
4 Comments
 
LVL 4

Accepted Solution

by:
mukhtar2t earned 250 total points
ID: 18830838
0
 
LVL 17

Assisted Solution

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

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JavaScript waiting 14 67
SharePoint 2013 List with Ratings 6 29
Javascript Hashmap output 8 44
CONVERT JAVASCRIPT BUTTON TO HYPERLINK TEXT 6 12
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to create an extensible mechanism for linked drop downs.
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

929 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now