Tree Structure in JSP

Hi,
I have an xml file , my requirement needs me to display the xml file as a tree structure in jsp. The user should be able to make changes to tree. he can drag and drop the nodes and save the changes.
I parsed the xml file and created a method that returns an arrayList of the immediate children given a node.I'am not getting how to proceed from there on.
Can anyone provide me with any useful tips or code. I can use javascript css java(not swing).Please reply ASAP as I have to complete it soon.
Thanks,
Sabi

Hi why dont you try the link below,
basically its for menu u can change it,
http://demo.raibledesigns.com/struts-menu/
in the above link see the following hyperlink
Expandable DHTML List Example - Shows Expandable DHTML list

Similar Messages

  • Creating a tree structure in jsp- URGENT

    Hi,
    I need to create a tree structure using jsp. Can anybody help me out.
    Thanks in advance.

    to do what? to store what? be more specific dude. As a first suggestion use XML.

  • How to get Tree structure in JSP page?

    Hi,
    I would like get data from the database and display the data in tree structure with the check boxes at each nodes on a jsp page with out using any third party tools. how can i do that? Do i require any new tags to fulfill this requirement?
    can any one help me out by sending any example code?
    thanks in advance.
    Regards,
    Reddy

    Once you have the data in a list or something, can't you just use <c:forEach> and then output standard nested <ul> and <li> tags to give the tree structure.
    <html>
         <style>
              li
                   list-style-type:none;
         </style>
         <body>
              <form>
                   <ul>
                        <li>
                             <input type="checkbox">Check 1</input>
                             <ul>
                                  <li>
                                       <input type="checkbox">Check 1A</input>
                                  </li>
                                  <li>
                                       <input type="checkbox">Check 1B</input>
                                  </li>
                             </ul>
                        </li>
                        <li>
                             <input type="checkbox">Check 2</input>
                             <ul>
                                  <li>
                                       <input type="checkbox">Check 2A</input>
                                  </li>
                             </ul>
                        </li>
                        <li>
                             <input type="checkbox">Check 3</input>
                        </li>
                   </ul>
              </form>
         </body>
    </html>

  • Dynamic menu in tree structure in JSP

    Hi,
    1) I need to display a dynamic menu in JSP. The menu depends on the values received from database. I need to show the items in the structure of tree (like parents, child relation). The tree can have multiple levels (the parent can have children & these children too can have children). This tree structure would be on left side of the screen.
    I would like to use some custom tags rather than javascript. Can somebody post the custom tags or some samples?
    2) Also, once the user selects different items from menu, different action classes should be called. And accordingly, the right side of the screen will show different data.
    So, there should be any way to set different action classes for the menu items. Please post any samples or helpful links.

    Hi,
    1) I need to display a dynamic menu in JSP. The menu depends on the values received from database. I need to show the items in the structure of tree (like parents, child relation). The tree can have multiple levels (the parent can have children & these children too can have children). This tree structure would be on left side of the screen.
    I would like to use some custom tags rather than javascript. Can somebody post the custom tags or some samples?
    2) Also, once the user selects different items from menu, different action classes should be called. And accordingly, the right side of the screen will show different data.
    So, there should be any way to set different action classes for the menu items. Please post any samples or helpful links.

  • How to Implement Dynamic Tree structure in jsp

    Hi,
    Does any body help me to solve out my requirement??
    I want to display all my folder contents (parent & childs) in windows explorer format, the root folder path will come from database.
    Thanks in advance

    There are many ways to achieve this. The simplest would be to use some existing tag library that renders a tree structure and feed it with the required data.

  • How do I implement Tree structure in table in JSP?

    Hi
    how do I implement Tree structure in table in JSP? any body suggest?
    Thanks
    siva

    If you're using JSP+JSTL, use the JSTL's c:forEach tag. If you're using JSP+JSF, use the Tomahawk's t:tree tag.

  • Tree View through JSP and Java Script

    Hi,
    I am looking for code or ideas of a Tree Structure as shown in in the left side frame of admin console of Sun App server 7 on the browser. I need to create a tree structure which will work on the browser like it works on the Sun App Server 7 admin console. If you had any idea or code, please share with me. I would like to have some idea before I start building it. The tree will be build from the database. So any database design is also helpful. I am planning to have that tree using JSP and EJB.
    Please help. If you are not clear what I am looking for, then please drop a line in this forum, so that I can explain it fine.
    Thanks in advance.
    Amit

    You can use the JSP Tree Tag I have developed. This helps you both structuring the tree model itself + it takes care of displaying the tree in a nice way. You can change all HTML code used to display the tree. Also you can build trees dynamically instead of just displaying static trees. Take a look at it here:
    http://www.jenkov.dk/projects/treetag/treetag.jsp
    Kind Regards,
    Jakob Jenkov

  • Dynamic Tree Creation using JSP, Struts framework

    I urgently require tips/information/code snippet for creating a Dynamic Tree structure.
    Tree is the hierarchical folder structure that we see in windows operating system.
    Dynamic tree in the sense that all nodes shall be populated from database & a radio button shall be present at each node that can be selected & submitted to form.
    Tree should be done using JSP (& if required Javascript).
    I am using Struts framework .
    [email protected]

    u need to know quite a few java technologies to make archieve your dream.
    JDBC, dynamic array and JSP.
    after reading tutorial regarding to these 3 materials, you should be able to get your job done.

  • How to Show floders and documents as a tree structure from path only

    sir,
    I am doing system side project using Java..
    so i want to know how to show folders and documents as tree structure format..
    plz give your idea regarding this?

    See for example Tree taglib in Coldtags suite:
    http://www.servletsuite.com/jsp.htm

  • Tree structure of portal application in NWDS

    Hi all,
    Im new to portal applications and I did not under stand the tree structure that appears after we start portal application in ep perspective in NWDS. Especially the PORTAL-INF and src.code in the tree structure .If any body has any relevant information or document about it please send me.

    portal applications are same as the Web applications developed in Java, JSP ....
    PORTAL-INF is same as the WEB-INF in normal web application structure.
    in Web application we create .war file whereas here we create as .par file.
    in web application we have web.xml inside WEB-INF folder where as here we have portalapp.xml.
    src.core and src.api is used as the source code folder.
    You can check this in "Java Build path" if u go to the project properties.
    Hope this give u a small idea on portal files structure.
    cheers.
    Chinmaya
    Reward points for hellpful answers.

  • Loading in tree structure from arraylist

    Hi,
    I have a ArrayList contains xml file path like
    ArrayList al={"/folder1/sub1/sub11/1.xml",
    "/folder1/sub1/2.xml,
    "/folder1/test1/3.xml",
    "/folder2/sub2/4.xml",
    "/folder2/sub2/sub3/5.xml"}
    Note: 1.This arraylist objects are dynamically loaded.
    2.The objects in array list are not file system directory path like (e.g., C:/folder1/sub1/.....). Its string added in arraylist.
    using this arraylist i want to load it in jsp tree structure, like
    folder1
    |___sub1
    | |_sub11
    | | |__1.xml
    | |_2.xml
    |___test1
    |_3.xml
    folder2
    |
    |_sub2
    |___4.xml
    |___sub3
    |___5.xml
    Can any one help me with logic or predefined function in java to iterate each string array object and split parent and sub child folder and load it in tree.
    Edited by: manjunath_2284 on Aug 11, 2009 6:04 AM

    Create a Node class that has a name and Map<String, Node> as children.
    Iterate over the list, split each entry on "/", and place the parts that you get into the Node structure.

  • How to store a Tree Structure in Memory

    hi all!
    I wanted to show a Org Chart on web page. Recursion is used for constructing.Based on B/S architecture,(get Org from DataBase)this is not a effective way!! How can I store a tree structure(Org object are stored as TreeNodes) in memory for recursion??? Thanks!

    My English is too poor! So I posted the interfaces blow.
    I used these interface to construct a org tree(which will displyed in browser ),but it's
    efficiency is low. (recursion)Because the org infor. are stored in database(thounds of
    orgs are stored).(I think this is the bottleneck)
    Now I want to store the tree structure in memeory! Then jsp page only needs to build the tree
    from memory!Needn't make a DbConnection every time. A timer will updated tree org(in memory)
    automatic
    So I want to use a N dimensions array to store the data (N is the number of orgs)
    but I don't konw how to make a compositor for sorting!
    after sorting .look at the matrix I poster blow(eg.)
    Matrix:(a,b,c,d are orgs 1 mean's is parents 0 means not, this is a Sparse Set huh? ^_^ )
    * a b c d
    a 0 0 0 0
    b 1 0 0 0
    c 1 0 0 0
    d 0 1 0 0
    Org tree:
    a
    b c
    d
    so O(n(n-1)/2)
    question:
    1)How to sort orgs?
    2)Any good suggestion is wanted!
    Thanks!
    interfaces
    public interface IOrg {             //entity class
    public String getName(); //get Org Name
    public String getId(); //get Org Id
    public String getLevel(); //get Org Level (as String)
    public String getParentId(); //get parent org Id
    public String getDescription(); //get the description
    public boolean isActive(); //is Org active
    Org Factory
    import java.util.*;
    * Description of the Interface
    *@author ymruan
    *@created 2002��1��4��
    public interface IOrgFactory {
    public IOrg getOrgById(String orgId);
    public IOrg getOrgByObjId(String objId);
    public Enumeration getManagers(String orgId);
    public Enumeration getManagers(IOrg org);
    public Enumeration getEmployees(String orgId);
    public Enumeration getEmployees(IOrg org);
    public Enumeration getOrgsByLevel(String level);
    public Enumeration getAllOrgs();
    public Enumeration getOrgsLikeName(String name);
    public IOrg getParentOrg(IOrg org);
    public IOrg getRootOrg(); //get Root Org
    public Enumeration getChildOrgs(IOrg org); //get Ogg's children
    public boolean hasSubOrgs(IOrg org); // is leaf
    public boolean hasActiveSubOrgs(IOrg org);
    public boolean isInOrg(String orgId, String empId);
    public boolean hasEmployees(IOrg org);

  • Displaying Tree Structure

    Hi every one,
    I have the following data in oracle DB
    NUMBER() VARCHAR2(30) CHAR(1),NULL NUMBER()
    WEB_GROUP_ID WEB_GROUP_DESC FLAG PARENT_WEB_GROUP_ID
    101 xxx
    102 yyy 101
    103 zzz 101
    104 xyz
    105 abc 104
    106 pqr 102
    107 aaa 102
    108 rrr 106
    109 xxxxcxx 106
    and i want to display the following structure in my jsp page like a tree
    101
    |
    |
    +----102
    | |
    |     |
    |     +---106
    |     |     |
    |     |     +--108
    |     |     +--109
    |     |
    |     +---107
    |
    +----103
    104
    |
    |
    +----105
    like this i have to print in the jsp page as a tree structure/File Explorer
    Can any one send me the code for this one..
    Thanks & Regards
    SAN

    Hi,
    Don't hold your breath while you are waiting. :)
    This is a forum where you can ask specific questions that are related to programming, and people might post short code examples, but don't expect people to post complete code.
    What have you done so far? How did it fail?
    Kaj

  • Required info on tree structure.

    Hi All,
    Can any body help me in displaying data in a tree structure in PDA.
    We have a requirement where the data comes with parent & child relationship, each child may or may not be a parent and the tree may drill more than 10 levels.
    when user clicks on the node all the subsequent childs need to be displayed and on the second click the tree need to be collapsed to that node level.(this should be similar to some of the data in sap ex: functional locations)
    IS there a component in MI / MAM application to acheive the same else what is the possible way for this.
    Your help will be well appriciated.
    Thanks & Regards,
    Sai.K. K

    Hi Sai,
    well, the answer is unfortunally a NO in the first place.
    MI is based on standard JSP and AWT functionality - up to Version 7.0 - and both runtime environments do not support that stuff on PDA.
    If you run the APP on Lapop only, you could build something like that with Java Script in HTML or extend the functionality there with some Add ons externally available that can be filled by normal XML. But this is outside the usual MI scope, it depends on your creative level. WebDynpro on the other side supports you with a tree view as I remember, so this could be an option - but again, only on Laptop.
    The question is: why do you not split the tree view to several pages? I have no idea about the amount of data you need to carry with you, just in the first place already. Usually tree view could mean a lot of data and this could end up in a long waiting time just to display the first page. Perhaps it is an option to show the actual level of the tree and if the user selects on item, then this item is added to the path (how has he got there) and the next level is displayed in the screen. Pretty much like the Windows Workplace, where every klick on a folder opens a new window with just the info of that window. Performance wise tis could perhaps be the better option.
    Does this help?
    Regards,
    Oliver

  • How to create a tree structure using forms.

    Hi,
    How do i create a tree structure using oracle forms,i have a table named Functions and a specific column 'Function Name' should be displayed in the tree nodes.Can anyone help me out on how to create a tree structure and populating the nodes??
    thanks in advance
    Regards
    Karthik

    The FTree package provides functions to populate the tree - look for the topic "Manipulating a hierarchical tree at runtime
    " in the online help this point to all the functions and triggers

Maybe you are looking for

  • X99A SLI plus and M.2 not showing up in the BIOS

    I just put together my new computer and I'm having trouble with the BIOS settings. When I attempt to set the M.2 as the primary boot drive it doesn't show up as an option. In the system status screen the M.2 / SATA port 5 is saying not present. I ver

  • How can I circumvent this connection issue due to closed-lid mode?

    I recently purchased a new Samsung monitor and have narrowed down the deficient connectivity to the fact that the Wi-Fi antennae is located at the "MacBook Pro" area of my computer's monitor. I own a late 2009, 2.26 GHz MacBook Pro connected to a 201

  • Code to download JVM ?

    Hi, I want to know the codebase in the object tag to download the JVM for the applet. Thanks

  • I can't type text with special Spanish characters (Captivate 6)

    Hi there, I've just downloaded Adobe Captivate 6 to try it out and found that I can't type some special characters widely used in Spanish language: our accents or tildes (that's the Spanish word for them). That's what I can't type: Á or á É or é Í or

  • How to install new bios??

    hi guys first time i post here.. i have a question.. i just download it the 12a bios from this page how can i install it?? i have no idea.. im, a newbee i just buy a AMD 3400 clawhammer MSI K8N platinium 2x515 corsair value pack shappire x800xt plati