Help: Creating a Dynamic TreeView Using JSP

I'm involved in a research project developing a webclient for the subversion VCS. I was able to access the repository and get the content as a string using the JavaSVN Library. It is like follows
A/
A/1.txt
A/B/2.txt
A/B/3.txt
C/
C/4.txt
The problem i'am having is that displaying this out put in a tree Type Structure. So any one can help me this any matter is greatly appriciated
Regards,
Samantha

Javascript open source for Tree Menu
http://www.softcomplex.com/products/tigra_tree_menu_pro/

Similar Messages

  • How to create two level dynamic list using JSP , Java Script and Oracle

    I am new in JSP. And i am facing problem in creating two level dynamic list using JSP ,Java Script where the listdata will come from Oracle 10g express edition database. Is there any easy way in JSP that is available on in ASP.NET.
    Plz response with details.

    1) Learn JDBC API [http://java.sun.com/docs/books/tutorial/jdbc/index.html].
    2) Create DAO class which contains JDBC code and do all SQL queries and returns or takes ID's or DTO objects.
    3) Learn Servlet API [http://java.sun.com/javaee/5/docs/tutorial/doc/].
    4) Create Servlet class which calls the DAO class, gets the list of DTO's as result, puts it as a request attribute and forwards the request to a JSP page.
    5) Learn JSP and JSTL [http://java.sun.com/javaee/5/docs/tutorial/doc/]. Also learn HTML if you even don't know it.
    6) Create JSP page which uses the JSTL c:forEach tag to access the list of DTO's and iterate over it and prints a HTML list out.
    You don't need Javascript for this.

  • Creating a dynamic jtree using datas retrieved by dom in xml parsing

    help me with code to create a dynamic jtree using data retrieved as nodes by xml parsing using dom

    Ok, so you want to make a tree. To determine the data that appears in a tree, you have to make a custom tree model. The API for this is at :
    http://java.sun.com/j2se/1.4.2/docs/api/
    A tutorial for using trees is at :
    http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html
    I assume you are going to be using Nodes, since you are using XML. For this I might start with something like
    class NodeTreeModel implements TreeModelI would then implement the 'getChildCount()' as the number of subnodes a node has, and the value of a tree node to the nodes value.
    Hope that starts you off.

  • Need Help Badly on Shopping Cart Using JSP And Java Servlet

    Hi All,
    This is the 1st time i am trying to create a shopping cart using JSP and Servlet.
    I have read through a few acticles but i still do not get the whole idea of how it works.
    Please guide me as i need help very badly.
    Thanks.
    This is one of the jsp page which displays the category of products user would like to buy : Products.jsp
    <html>
    <head>
    <title>Purchase Order</title>
    </head>
    <body topmargin="30">
    <table border="0" width="100%" id="table1" cellpadding="2">
         <tr>
              <td bgcolor="#990000" width="96">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Code</font></b></td>
              <td bgcolor="#990000" width="260">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Description </font></b></td>
              <td bgcolor="#990000" width="130">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Brand
              </font></b></td>
              <td bgcolor="#990000" width="146">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">UOM
              </font></b></td>
              <td bgcolor="#990000" width="57">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Unit<br>
              Price </font></b></td>
              <td bgcolor="#990000" width="62">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Carton<br>
              Price </font></b></td>
              <td bgcolor="#990000" width="36">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Qty</font></b></td>
              <td bgcolor="#990000" width="65">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Add<br>
              To Cart</font></b></td>
         </tr>
    <tr>
    <td align="center" width="96" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">123</font>
    </td>
    <td align="center" width="260" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tom Yam</font>
    </td>
    <td align="center" width="130" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Nissin</font>
    </td>
    <td align="center" width="146" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">12 x 10's</font>
    </td>
    <td align="center" width="57" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">$3.85</font>
    </td>
    <td align="center" width="62" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">$46.2</font>
    </td>
    <td align="center" width="36" bgcolor="#CCCCCC">
    <!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" -->
    <p align="center"><input type="Integer" name="Q10005" size="1"></p>
    </td>
    <td align="center" width="65" bgcolor="#CCCCCC">
    <p><input type="checkbox" name="checkbox" value="123"></p>
    </tr>
    <tr>
    </table>
    <table border="0" width="100%" id="table2">
         <tr>
              <td>
              <div align="right">          
                   <input type="hidden" name="hAction" value="AddToCart"/> 
              <input type=submit name="submit" value="Add To Cart"/>                     
    </div>
    </td>
         </tr>
    </table>
    </body>
    </html>
    After user has make his selection by entering the qty and ticking on the check box, he would click the "Add To Cart" button ... and this would call my servlet : AddToAddControlSerlvet.java
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.*;
    import java.util.*;
    import java.util.ArrayList;
    public class AddToCartControlServlet extends HttpServlet
         public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException
              String action = req.getParameter("hAction");
              if (action.equals("AddToCart"))
                   addToCart(req,res);
         public void addToCart(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
              try
                   String url = "";
                   String[] addList = req.getParameterValues("checkbox");
                   HttpSession sess = req.getSession(true);
                   //String sessionID = sess.getId();
                   DBClass dbClass = new DBClass();
                   ArrayList cartList = new ArrayList();
                   for (int i = 0; i < addList.length; i++)
                        String productCode = (String)addList;
                        int qty = Integer.parseInt(req.getParameter("Q"+productCode));
                        Products product = dbClass.getProductDetail(productCode);
                        double totalUnitAmt = qty * product.getUnitPrice();
                        double totalCartonAmt = qty * product.getCartonPrice();
                        Order order = new Order(product.getProductCode(),product.getProductDesc(),product.getBrandName(),product.getUom(),qty,product.getUnitPrice(),product.getCartonPrice(),totalUnitAmt,totalCartonAmt);
                        cartList.add(order);
                   sess.setAttribute("cartList", cartList);
                   url = "/Cart/CartDetails.jsp";
                   ServletContext sc = getServletContext();
                   RequestDispatcher rd = sc.getRequestDispatcher(url);
                   rd.forward(req, res);
              catch (Exception e)
                   System.out.println(e);
    From here, i would get the list of items which user has selected and add to the cartList, then i would direct the user to CartDetails.jsp which displayed the items user has selected.
    From there, user would be able to remove or to continue shopping by selecting other category.
    How i do store all the items user has selected ... everytime he would wan to view his cart ...
    As i would be calling from jsp to servlet .. or jsp to servlet ... and i do not know how i should go about in creating the shopping cart.

    Hi !
    Yon can use a data structure as vector and store the items selected by the user into the vector . Keep the vector in session using session object , so the user can access the entire shopping cart from anywhere in the application .
    Then , you can change the cart accordingly .
    Hope this works.
    Cheers ,
    Pranav

  • How to create a dynamic newsflash using dreamweaver and PHP

    Hi there,
       I would like to create a dynamic newsflash using dreamweaver and PHP in that the newsflash will be pulling information from a MySQL database. The newsflash should also have a link to view more information about the piece of news a user wants to know more about. Which tools do I need to use in dreamweaver and how's the procedure to go about that. Any advice is highly appreciated. Thanx in advance!

    I think you´ll need at least a MySQL table with the following columns:
    - id (primary key, int, auto_increment etc)
    - news_headline (varchar)
    - news_teaser (text)
    - news_content (text)
    What I´d personally add are columns such as:
    - news_date (date or datetime)
    - news_external_link (varchar), if a "read more..." link is supposed to navigate to an external URL rather than displaying the contens of the "news_contents" column.
    Based on such a MySQL table it should be easy to use Dreamweavers standard Server Behaviors to create the usual datalist.php, insert.php, update.php and delete.php documents, and there are numerous tutorials out there which will teach you how to do that.
    Am I right when assuming that you´ll also need to know how to automatically pull, say, the 5 most recent news records from the database ?

  • I need to know how I will create a dynamic website using php and mysql

    I need to know how will I create a dynamic website using php and mysql that people could have the abilities of registering in the website, and modify their profile where they can add their pictures and everything. apart from that, they should have the ability to search about other member. hope to here more from you.

    If you are a right-brained creative, and have no previous experience or propensity to be able to understand coding and database "stuff", and/or if your time can be better spent on other skills, I recommend you save your sanity and hire a developer... or at least the first time around. I have been attempting to grasp this for years... and have a library of marked up books to prove my efforts, all while trying to keep up with an ongoing client base that is always cramped. It's a wonder I still have my sanity... then again, I might not be the best person to determine that. Others might question it.
    That said, I still plan to master php... one of these days.

  • How to create Reports and Forms using JSP

    Hi,
    How to create reports using JSP. And how many types of reports can be created using JSP.Can anyone explain with example please.
    Thanks,
    Vijayalakshmi.M

    Here is some code that creates xml for any SQL that returns a ResultSet. Note this uses my default out-of-the-box XML template, but you can quickly create and use your own templates to generate xml to look anyway you desire.
    FormattedDataSet fds=FormattedDataSet.createInstance();
    Map miscData=new HashMap();
    map.put("rootElement", "musicgroups");
    String xml=fds.getFormattedDataSet("select * from groups", miscData, "xml1");
    String xml has the value:
    <musicgroups>
    <row rowID='1'>
      <group_id>1</group_id>
      <group_name>Rolling Stones</group_name>
      <type>Rock</type>
    </row>
    <row rowID='2'>
      <group_id>2</group_id>
      <group_name>Beatles</group_name>
      <type>Rock</type>
    </row>
    <row rowID='3'>
      <group_id>3</group_id>
      <group_name>Led Zepplin</group_name>
      <type>Rock</type>
    </row>
    </musicgroups>steve -
    http://www.fdsapi.com - The easiest way to generate dynamic HTML and XML
    http://www.jamonapi.com - A performance tuning and scalability measuring API

  • How to get a dynamic pages using jsp?

    actually using jsp we create static pages.
    My question is whether it is possible to create dynamic pages. ie the page should reflect changes without refreshing or reloading. for example we have date timings frequently updated without refreshing

    Read Beginning JSP from WROX Press. It is a good book for developing dynamic JSP using all latest technologies.

  • Dynamic select using jsp?

    grrrrr............ok so I'm kinda new to this, and just a little frustrated. I'm gonna ramble here, so any time I sound like I don't know what I'm talking about it 's because I don't..correct me. I want to include a bean in a jsp which will buil d a dynamic select box on the fly. That is, connect to an LDAP db and place each value returned in the query in a select box. Now, I can compile and run the bean in my IDE and watch the output in the console. It's correct because I see "<select><option value = hall>hall....</select>". In the buildSelectBox() method I'm using System.out.println to display each line of my select box (is that right?). Now, when I copy the .class file over to the server I was initially getting an error because the bean wasn't found. I resolved that by properly compiling the bean in a package. Problem is that if I call the bean.buildSelect() method in the .jsp nothing comes back. The page is left blank. What in the world is that about? Can someone push me toward a tutorial that can push me in the right direction or sumthin? Why am I having so much trouble with this? Should I be building the select on the jsp?
    regards,
    mat

    Hi!
    If i understand you correctly :-) you are doing not very right things. I don't want it to seem like I'm going to teach you, but:
    The Bean that has buildSelect() method is not a bean at all. Usualy Beans contain getter/setters and accumulate data. If you want to build html code dynamicaly then you should use servlets(Which is not very flexible in your situation, I think), not JSPs. And if you are using JSPs then you have to make Tag which will do this everything.
    Other way is to use Struts framework which is very good and flexible for building web applications - it has it's own tags for many cases. You can make loops in JSPs, use beans and all that stuff.
    Guys will correct me if I missed something.
    Good luck

  • Problem - Creating a Dynamic LOV using duplicate value in select statement

    I am trying to create a Dynamic LOV by attempting to follow a pattern similar to the following:
    select shop_name d, shop_id r
    from shops
    order by 1
    However, I want to use the shop_name twice as in the following because I do not have any other unique identifier available such as a shop_id to associate with the shop name:
    select shop_name d, shop_name r
    from shops
    order by 1
    But I get an error where I am not allowed to duplicate the shop_name in the select statement. I read somewhere on this forum where it can be done but I can't find exactly how.
    Can someone tell or show me how to accomplish this?
    Thanks in anticipation for your answer.
    Thanks,
    Ric

    Ric,
    I just tried to do this on APEX 3.0, and it worked just fine with this SQL:
    select ename d, ename r from emp order by 1Perhaps you could put an example on apex.oracle.com or specify the error message that you're getting.
    So as long as you have uniquely aliased both columns, this should not present a problem.
    Thanks,
    - Scott -

  • Dynamic combobox using jsp

    HI All,
    This is very urgent for me please help me to come out of this.
    I just want to display the values in combobox from database using jsp,but i have difficulty in doing it can any one help me for this.I will be thankfull if any one gives me a code for the same.
    Ramesh.R

    very simple example
    <%@ page import="java.sql.*" %>
    Add Item:
    <SELECT NAME="item">
    <ol>
    <%
    Connection con5 =
    DriverManager.getConnection("url","user","password");
    String q5 = "query" ;
    Statement stmt5 = (Statement)con5.createStatement();
    ResultSet rs5 = stmt5.executeQuery(q5);
    while(rs5.next()){
    String str5= rs5.getString("field");
    %>
    <li> <% out.print("<OPTION>" + str5); %>
    <% } %>
    </ol>
    </SELECT>

  • Cancel- and main-button dynamically generated using JSP-pages

    Maybe a HOWTO for the Jdev-team.
    HOWTO get rid of the delete and main-button in your jsp-pages?
    Very simple!
    Go to the container_bottom.jsp page in your webapp/jsp-folder and delete the code for the cancel-button => now the user can render his own buttons by using a header.html, contents.jsp and footer.html for the jsp-pages.

    We tried the same thing you are trying to do and got
    very far, but it quickly became very complicated. We
    realized it was just simpler to use the screenflow as
    intended.
    By this I mean, if your parent form has 4 buttons
    (A,B, C and SUBMIT), you should design different
    paths in your screen flow for each button. so when a
    user clicks button A, the parent form submits back to
    Fuego engine, engine looks at screenflow and send
    them down the button A path to the Form A. When they
    hit submit on Form A, screenflow goes back to parent
    form.Hi, bcespinola:
    Our team finally decide use jsp with YUI (Yahoo User Interface Library) to achieve this design. Wish this could help you. All popup window would be replaced by Dialog of YUI. Thanks for your help.
    Vince

  • How to build dynamic menus using JSP==Urgent==Please Help me

    Hello,
    I have exhausted searching on internet to find a book
    which tells how to build Dynmic menus in JSP.I dont want
    to use DHTML as this becomes complex as the menu categories
    are built using data from database.Is there any workaround in
    java to do this without DHTML or atleast sample code.
    can somebody help me in this regard.
    Thanks
    Jack

    Hello a.s.kumar,
    I would be greatful if you could send me the sample code.
    [email protected]
    we can't let MM Flash run away with the show can we. Javascript can do a decent job, but the underlying menu data is static.
    Cheers, Darren

  • Managed bean can not be created. - dynamic menubar using ADF

    hi All,
    had to post the thread again to make sure it dint go un noticed!
    scenario:
    making dynamic menu navigation using ADFFaces, all steps followed as mentioned in SRDemo Sample. but still i get this error:
    error encountered:
    SEVERE:Managedbean menuItem_General could not be created.
    javax.faces.FacesException:Can't get value from value binding expression: '#{resources['erms.menu.gen']}'.
    more details here on last thread posted:
    ADF- managedbean creation error while making dynamic menus.
    plz help!

    We found the solution how it works... But its a little bit strange.
    Before we had the following on the sending part:
    connectionFactory = (ConnectionFactory) ctx.lookup("jmsfactory/default/FactoryName");
    destination = (Queue) ctx.lookup("jmsqueues/default/QueueName");
    We could not use EJB injection here as the place were it was used is a POJO.
    Now in our Job-Bean we do the following:
         @Resource(name="FactoryName")
         private ConnectionFactory connectionFactory;
         @Resource(name="QueueName")
         private Queue destination;
    and then we transfer the connection factory and queue to our POJO... and it works... From our understanding both should be the same???
    Frank

  • Creating a dynamic grid using actionscript

    Hello all:
    I am working on a Flash project which requires that the user
    input 2 values. These two values will be used as height and width
    to generate a dynamic grid. I am new to actionscript and am
    struggling with how to create the 2 input fields and pass the
    values to actionscript by an event such as the user pressing
    return. The code below will create the grid correctly based upon
    the hardcoded variable values hightlighted, but I need the user to
    enter the values and press return to generate the grid.
    Can anyone suggest the actionscript required to capture the 2
    values, send them to actionscript with an event such as pressing
    return and then have AS generate the grid width and height based
    upon the user input. The i (10) and j (10) values in line 4 and 5
    are the values that I need to have the user input to generate the
    grid.
    Any help will be most appreciated!
    initX = 0;
    initY = 0;
    counter = 0;
    for (var i = 1; i<=10; i++) {
    for (var j = 1; j<=10; j++) {
    counter++;
    grid_container.attachMovie("cellMC", "cell"+counter,
    counter);
    grid_container["cell"+counter]._x = initX;
    grid_container["cell"+counter]._y = initY;
    grid_container["cell"+counter].onRelease = function() {
    cellName.text = this._name;
    initX += 30;
    initY += 30;
    initX = 0;

    Thanks for the quick reponse kglad. I will give it a
    go.

Maybe you are looking for

  • HELP: Flash Error Parameter is incorrect.

    Hi. I really need help on this...I am working as a teacher in Singapore and I am currently doing a project for our school. I am using the Adobe CS4 Design Premium. I am using Adobe Flash CS4 for the project I am doing. Adobe Flash CS4 crash often and

  • Trouble Uninstalli​ng In-Home Agent - Any suggestion​s?

    I did uninstall In-Home Agent, however, surprise surprise - apparently it did not uninstall completely and  has lots of activity showing in my firewall process monitoring.  Which is rather interesting considering I no longer have any FIOS services an

  • Importing YouTube movies into iMovie

    I tried to import into iMove a YouTube movie but couldn't. Does anyone know how to convert YouTube movies into a format that can be imported into iMovie; also what programs there are to do this. Any help is welcome. Steven

  • My new iPhone 4 won't connect to 3G

    Just got a new iPhone 4 and although I can connect to Wifi which seems to be fine everywhere I've tried, I can't get it to connect to 3G. When I open Safari it shows the message 'Safari cannot open the page because your iPhone is not connected to the

  • Canon XA10 .mts audio not imported?

    Hello, I have CS6 Master Collection. A few weeks ago it all worked well. Now, when I create a new project, the XA10 option included within the AVCHD sequence settingsfor the sequence does not appear. I don't know if I was clear on that, English is no