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.

Similar Messages

  • DYNAMIC TABLE CREATION USING JSP

    I WANT TO CREATE A DATABASE TABLE IN AN INTERACTIVE WAY ie MY QUESTION IS: HOW TO CREATE A TABLE USING JSP WITH TWO ARRAYS(FIRST ARRAY CONTAINS FIELD(COLUMN) NAMES AND THE SECOND ARRAY CONTAINS ITS CORRESPONDING DATATYPE)BOTH ARRAYS ARE OF VARYING SIZE.IF THE USER ENTERS SUPPOSE '6' AS THE INPUT TO FORM A TABLE OF 6 FIELDS SO, THE QUERY SHOULD BE DYNAMICALLY FORME USING THE ARRAY NAME FOR FIELD AND THE ARRANAME FOR ITS CORRESPONDING DATATYPE.HAVE ANY IDEA ON THIS PLEASE LET ME KNOW.
    THANKS

    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.

  • Oracle portal using JSF, JSP, Struts framework

    Hi ,
    Can anyone tell me how to build an oracle portal using JSF,Jsp and Struts Framework.
    Also please provide any manual or documentation for developing oracle portal.
    Thanks in Advance,
    Raghav

    At present, i think the best thing to do is to look at the example provided with the struts-faces integration taglib. I don't know any documentation about it.
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/

  • Dynamic Photo Album using JSP

    Hi all,
    I've been having a bit of trouble getting help with my question - I've tried a couple of usenet groups, however don't seem to be asking the right question. So, I'm hoping that some Java forums may be of more relevance. I'm sorry if this is the wrong place, and if there is a better place for me to ask my question if you could tell me where that is, I'ld be greatful.
    I am looking at finding/ making an online dynamic photo album which
    uses JSP. I've seen a lot of examples using PHP and a few online
    albums using Javascript, however those albums using JavaScript are not
    dynamic - the images are hard coded.
    My scenario is this, we have about 6 different events with about 150
    photos each. What I would like to happen is to be able to have a index
    page which lists 10 photos each, and when you click on the photo to be
    taken to a secondary page with a larger image. I would like to do this
    without needing to create 150 dependant pages.
    I understand that we will be looking at using server side technology.
    As our pages already use JSP we don't want to add a second server side
    language (PHP, Pearl etc...) to the equation.
    So does anyone know of a script that may already do this? As I seem to be having no luck in finding one to suit my purpose, I would be happy to create my own script.
    The problem is that I am not too familiar with JSP - though I used to do a fair bit of ASP using VB Script. What I would like is to be pointed into a page that will show me how to create an array with a list of filenames in a given directory (using a Site relative path). From there I should be right, but I can't seem to find any references to how this can be done using JSP (or even Javascript).
    If anyone can help me I would greatly appreciate it.
    Regards
    Linda

    You need to File class, it can produce a list of files in a directory.
    File photodir = new File("c:/path/to/photos");
    File[] photos = photodir.listFiles();
    for(int i = 0; i < photos.length; i++){
    File fp = photos;
    if(fp.isFile()){
    // check to see if it is an image

  • Seeking solution in WLP for using MVC struts framework

    Hi,
    We would like to implement Struts like similar solution with Weblogic Portal Server.
    I would like to know the possibilities of bringing the Struts framework in WLP
    and I also would like to know the contraints in implementing the similar framework
    in existing WLP.
    Thanks in advance.
    Regds,
    Ratnakar

    Hi Rathnakar,
    In this very same newsgroup this subject has risen in september last year.
    I include the posting, but admit that I have not tried it so far.
    Regards,
    Ad van Ommen
    [email protected]
    ===================================================
    "Raphaël Faudou" <[email protected]> wrote in message
    news:<[email protected]>...
    I have not seen any official document on this integration but I personnaly
    developped
    a struts-portal adapter that allows a struts-based webapp to run as a
    portlet
    in the BEA portal.
    The idea is to redirect the displaying
    nstruction -requestDispatcher.forward(request,
    response) - toward the portal webflow servlet with the appropriate
    parameters
    (portletName, pageName, event).
    Remark : If you use struts 1.1, this adapter is very simple because you only
    have
    to inherit the RequestProcessor class and redefine the "doForward" method.
    Then, you have two design solutions :
    1) you model a simplified webflow with only presentation nodes and
    transitions
    that match what your navigation as specified in your struts-config.xml.
    In this case, logic is handled by Struts framework and presentation is
    handled
    by the portal webflow servlet.
    2) you dont' want to use portal webflow and you have to bypass it by
    developing
    another adapter at the portal side.
    In this case, logic and presentation are handled by th Struts framework and
    the
    portal adapter only displays the next page in the appropriate portlet.
    Conclusion : you can deploy a struts-based application in the BEA portal
    after
    developing one or two adapters that can be generic.
    Good luck
    =====================================================
    "Ratnakar Sonti" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi,
    We would like to implement Struts like similar solution with WeblogicPortal Server.
    I would like to know the possibilities of bringing the Struts framework inWLP
    and I also would like to know the contraints in implementing the similarframework
    in existing WLP.
    Thanks in advance.
    Regds,
    Ratnakar

  • Dynamic menu creation in JSP treating source as dynamic xml

    Hi Everyone,
    I have a XML file which is a dynamic one..It is generated from a tool..I need to parse that xml and generate a menu accordingly in a jsp.In menu the data to be displayed comes from thie hierarchical xml file which is a dynamic one..Siblings and child notes are not fixed..it all generates at rum by some other tool.
    Please help me to tell any logic to create such a dynamic menu ...i am using Dom parser to parse that..
    Regards
    Sajal

    Hi
    This is the xml...I want to display the values in a JSP menu..These values comes from this XML...Like for this XML the struscture will be like
    --Category
    |
    | IT Services
    |
    |ABC Softwares
    |
    |Application Developement
    |
    |Java
    |Mainframes
    |Production Support
    <DIMENSIONS>
    <DIMENSION NAME="CATEGORY">
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="1"/>
    <VALUE>IT Services</VALUE>
    </DVAL>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="2"/>
    <VALUE>ABC Softwares</VALUE>
    </DVAL>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="3"/>
    <VALUE>Application Development</VALUE>
    </DVAL>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="4"/>
    <VALUE>Java</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="5"/>
    <VALUE>Mainframes</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    </DIMENSION_NODE>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="6"/>
    <VALUE>Production SUpport</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    </DIMENSION_NODE>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="7"/>
    <VALUE>DEF Softwares</VALUE>
    </DVAL>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="8"/>
    <VALUE>Application Development</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="9"/>
    <VALUE>Production SUpport</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    </DIMENSION_NODE>
    </DIMENSION_NODE>
    </DIMENSION>
    </DIMENSIONS>
    So in this way i need to populate the data from XML.. there can be n number of nodes child nodes and Siblings..and siblings can also have further Child nodes...So need to populate the JSP Menu from this xml..
    Please suggest some logic or if somebody has some sample code..

  • Forwarding to an action using the struts framework

    hey people,
    in struts we write something like
    <forward name="abc" path="/xyz.do" contextRelative="true"/>
    for an action
    and to forward to that action we use
    return mapping.findForward("abc");
    My problem is that i want to forward to the action xyz.do action without specifying the forward tag in struts config i.e without giving
    <forward name="abc" path="/xyz.do" contextRelative="true"/>
    any idea how i can forward to the action directly without giving the above tag. also i dont want to give the forward tag in global forwards.

    you want to forward to another action without declaring that forward in the struts config? we use MVC frameworks to avoid having to write all that sort of code. what are you trying to achieve that can't be done by configuring the forward?

  • Dynamic header creation using SQL

    Hi Gurus,
    I need your help again. I have a query which uses a date parameter to populate a report. The report pulls out data from the user entered date to minus eleven months. The report counts totals calls registered each month. I have the query working fine but I need help in populating the header.
    For ex - suppose I run the query on todays date (18-Jan-2012)
    The report header will be -
    Jan Feb Mar Apr ....Dec
    But I want the header to be populated in the following format -
    Jan 2012 Feb 2011 Mar 2011 Apr 2011....Dec 2011
    And for ex if I run the report for a future date say (21-May-2012)
    The header will be in the following format -
    Jan 2012....May 2012 Jun 2011 Jul 2011 .......Dec 2011.
    Please let me know if I can populate the header using SQL. Any help is greatly appreciated.

    Hi Tenacious,
    You wrote:
    I want the header to be populated in the dynamic format with the year value concanated to the Month column.My script does that; you can look one more time at the output in my first post, and also in my second post.
    And if you want another example, when we replace 18-Jan-2012 by 21-May-2012, we have the following:
    SQL> select to_char(col,'Monyyyy') col_date
      2  from
      3  (select
      4         add_months(to_date('21-May-2012','dd-Mon-yyyy'),
      5                      -level + 1) col
      6  from dual
      7  connect by level <= extract(month from to_date('21-May-2012','dd-Mon-yyyy')
      8  union
      9  select
    10         add_months(to_date('21-May-2012','dd-Mon-yyyy')
    11                    , level - 12 )
    12  from dual
    13  connect by level <= 12 - extract(month from to_date('21-May-2012','dd-Mon-y
    yyy')))
    14  order by extract(year from col) desc, extract(month from col);
    COL_DAT
    Jan2012
    Feb2012
    Mar2012
    Apr2012
    May2012
    Jun2011
    Jul2011
    Aug2011
    Sep2011
    Oct2011
    Nov2011
    COL_DAT
    Dec2011
    12 rows selected.
    SQL>

  • Dynamic Table Creation using RTTS - Question on Issue

    I am using the RTTS services to dynamically create a table.  However, when I attempt to use the get_components method it does not return all the components for all tables that I am working with.
    Cases and End Results
    1) Created structure in data dictionary – get_components works.
    2) Pass PA0001, P0001 or T001P to get_components and I do not receive the correct results.  It only returns a small subset of these objects.  The components table has all the entries; however, the get_components method only returns about 4 rows.
    Can you explain this and point me to the correct logic sequence? I would like the logic to work with all tables.
    Code excerpt below:
    The logic for the get components works for case 1, but not case 2. When I pass into this method a "Z" custom table or structure name for parameter “structure_name” and the get_components() method executes and returns the correct results. However, when I pass in any of the objects listed above in case 2, the get_components method does not return the correct number of entries. When I check typ_struct which is populated right before the get_components line, I see the correct number of components in the components table. 
    method pb_add_column_headings .
      constants: c_generic_struct type c length 19 value 'ZXX_COLUMN_HEADINGS'.
      data: cnt_lines      type sytabix,
            rf_data        type ref to data,
            typ_field      type ref to cl_abap_datadescr,
            typ_struct     type ref to cl_abap_structdescr,
            typ_table      type ref to cl_abap_tabledescr.
      data: wa_col_headings type ddobjname.
      data: rf_tbl_creation_exception type ref to 
                                      cx_sy_table_creation,
            rf_struct_creation_exception type ref to
                                      cx_sy_struct_creation.
      data: t_comp_tab type
                       cl_abap_structdescr=>component_table,
            t_comp_tab_new      like t_comp_tab,
            t_comp_tab_imported like t_comp_tab.
      field-symbols: <fs_comp> like line of t_comp_tab,
                     <fs_col_headings_tbl> type any table.
    **Get components of generic structure
      wa_col_headings = c_generic_struct.
      typ_struct ?= cl_abap_typedescr=>describe_by_name(
                                       wa_col_headings ).
      T_COMP_TAB = typ_struct->get_components( ).
    **Determine how many components in imported structure.
      typ_struct ?= cl_abap_typedescr=>describe_by_name(
                                        structure_name ).
      t_comp_tab_imported = typ_struct->get_components( ).
      cnt_lines = lines( t_comp_tab_imported[] ).

    Hi Garton,
    1. GET_COMPONENT_LIST
       Use this FM.
       It gives all fieldnames.
    2. Use this code (just copy paste)
    REPORT abc.
    DATA : cmp LIKE TABLE OF rstrucinfo WITH HEADER LINE.
    DATA : pa0001 LIKE TABLE OF pa0001 WITH HEADER LINE.
    CALL FUNCTION 'GET_COMPONENT_LIST'
      EXPORTING
        program    = sy-repid
        fieldname  = 'PA0001'
      TABLES
        components = cmp.
    LOOP AT cmp.
      WRITE :/ cmp-compname.
    ENDLOOP.
    regards,
    amit m.

  • Dynamic table creation using JDBC

    hi all, i am working in JDBC and using prepared statements.the problem i have is i need to create and read from tables,dynamically and i should also create tables with keys dynamically,i.e the user gives the table name and i should create it using JDBC.the user does not enter the full query he just types the table name.i am using oracle as backend.i have tried prepared statements to retrieve datas from tables whose names r given dynamically like
    "select * from ?"
    and then using
    setString(1,the variable which holds the table name);
    but this doesnt seem to work.it says invalid table name.how can i do this.i shd also create tables the same way like
    "create table ? ..."
    is there a way out of this problem or is there any other type of statement that i can use.please give a detailed example.thanks in advance.

    Usually when I work with Oracle DBA's they get real excited when I suggest that the application could create the tables dynamically. Because this means that there is absolutely no chance that there is a coherent implemetation of table allocation.
    Seemed like a good point to me.

  • 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.

  • Dynamic Dynpro Creation using RPY_DYNPRO_INSERT

    Hi there,
    Did anyone of you already worked with this function and could provide me some information about the following points?
    1. How do I have to fill the CONTAINERS and FIELDS_TO_CONTAINERS tables to let the Dynpro show me e.g. a text field with the text "Hello World"? (The Dynpro header works fine and I also get the Dynpro shown, but without any fields, also the Flow Logic works fine) Which fields of the appropriate structures do I have to fill in which way?
    2. Due to my task I need to generate the Screen at runtime and every time it is called I need a new one. Is there a possibility to delete these Screens dynamically again? So the program does not create thousands of Screens over time.
    Thank you in advance for your help.
    Kind Regards,
    Sebastian

    Hi there,
    Did anyone of you already worked with this function and could provide me some information about the following points?
    1. How do I have to fill the CONTAINERS and FIELDS_TO_CONTAINERS tables to let the Dynpro show me e.g. a text field with the text "Hello World"? (The Dynpro header works fine and I also get the Dynpro shown, but without any fields, also the Flow Logic works fine) Which fields of the appropriate structures do I have to fill in which way?
    2. Due to my task I need to generate the Screen at runtime and every time it is called I need a new one. Is there a possibility to delete these Screens dynamically again? So the program does not create thousands of Screens over time.
    Thank you in advance for your help.
    Kind Regards,
    Sebastian

  • Dynamic app creation using MXML?

    I'm working on creating a small quiz application which will
    be driven by pre-formatted external XML. I have designed various
    custom question canvases for each of the question types (MCQ, short
    answer, match-pairs etc.) and I'm wondering if there is some way to
    implement the main application using MXML instead of ActionScript?
    I've managed to hard-code the order of the questions, knowing
    which canvases are needed in which order, but I need to be able to
    detect the question type from the XML (that bit I can manage) and
    then add the appropriate question canvas component in order in my
    tabNavigator.
    Essentially, I'm trying to replicate the function of a
    switch:case clause in MXML. Does anyone know if this is possible?
    I've started trying to implement it in ActionScript, but I'm a bit
    of a newbie to AS3, and I keep getting errors I don't understand,
    like "Access of undefined property" where I'm referring to an
    object I've just declared and instantiated in the previous line of
    code. E.g (anywhere I use mainPanel):
    <mx:Script>
    <![CDATA[
    import mx.controls.Text;
    import mx.containers.Canvas;
    import mx.containers.Panel;
    var mainPanel:Panel = new Panel();
    Root.addChild(mainPanel);
    mainPanel.layout = "absolute";
    mainPanel.setStyle("left", 10);
    mainPanel.setStyle("top", 10);
    mainPanel.setStyle("right", 10);
    mainPanel.setStyle("bottom", 10);
    var testPage:Canvas = new Canvas();
    var numQuestions:int = quizQns.childNodes.length;
    var qTypes:Array = new Array(numQuestions);
    var textLine:Array = new Array(numQuestions);
    ]]>
    </mx:Script>

    You can declare and initialize variables outside functions in
    your script block, but for most else you need to do it in a
    function. I would continue learning AS3 as it will give you real
    flexibility and power.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.controls.Text;
    import mx.containers.Canvas;
    import mx.containers.Panel;
    private var mainPanel:Panel;
    private var testPage:Canvas = new Canvas();
    private var numQuestions:int = 10;
    // private var numQuestions:int = quizQns.childNodes.length;
    private var qTypes:Array = new Array(numQuestions);
    private var textLine:Array = new Array(numQuestions);
    public function init():void {
    mainPanel = new Panel();
    addChild(mainPanel);
    mainPanel.layout = "absolute";
    mainPanel.setStyle("left", 10);
    mainPanel.setStyle("top", 10);
    mainPanel.setStyle("right", 10);
    mainPanel.setStyle("bottom", 10);
    ]]>
    </mx:Script>
    </mx:Application>

  • Dynamic GIF Creation thru JSP

    Hi All,
    I am able to create .bmp file by using the following code.But I need to create a GIF instead of BMP.
    The code follows as
    <%
    BufferedImage image =new BufferedImage(1000,1000,BufferedImage.TYPE_INT_RGB);
    Graphics graphics = image.getGraphics();
    graphics.setColor(Color.black);
    graphics.fillRect(0,0,1000,1000);
    graphics.setColor(Color.red);
    graphics.setFont(new Font("arial",80,80));
    graphics.drawLine(20,980,980,980);//Horizontal Line
    graphics.drawLine(100,20,100,990);//Vertical Line
    graphics.dispose();
    ServletOutputStream sos = response.getOutputStream();
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
    encoder.encode(image);
    %>
    How can I create GIF file.Please help me.
    Thanks in advance.

    You may want to have a look at this...
    http://www.acme.com/java/software/Acme.JPM.Encoders.GifEncoder.html

  • 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.

Maybe you are looking for

  • Change of local currency amount in park document

    Dear SAP Experts, I have some queries regarding the local currency in parked document. Here are the steps to generate the issues: 1. Enter vendor invoice using FB01 tcode. E.g the company code currency is MYR, then change the document currency to USD

  • How to use ABAP to load data to a DSO

    I have a use case where we load data to a Direct Update DSO with an ABAP program. We do this by directly writing to the table /BIC/Atablename00. While this approach has been working for us so far, it has a few drawbacks: - no requests are generated (

  • Leapoffice add-in to outlook

    the client of mine, has SBS2011 server with exchange enabled. the sbs server is hosting database called leap office nd leap accounting. Workstations are part of local domain and Microsoft outlook is loaded to work with leap as email sender. The add-i

  • Unable to hide Refresh link in "No Result" view in BISE1 10.1.3.2.1 version

    Hi experts, I am using Business Intelligence Standard Edition One 10.1.3.2.1 version. I am unable to hide the Refresh link in No Result view, I have checked all the blogs and forums related to this problem. They have asked to use the following script

  • Iphone skip to next or previous song stalls, freezes or crashes iphone

    Hello, daily when im listing to a playlist when I skip to the next song or skip back few my iphone will lock up or freeze for about 30 or so seconds, or it will crash and go to the home page. This sounds like a hardware problem with reading data of t