How to build a tree in a jsp ?

Discussion in 'Java' started by MC, Aug 15, 2005.

  1. MC

    MC Guest

    Hi to all,

    First excuse my bad english ;-)

    I'm working on a struts web application. I've to develop a screen in
    order to construct and/or modify a hierarchical structure (typically a
    DOM tree) of the following type:
    http://www.oracle.com/technology/oramag/oracle/03-sep/images/o53xml_f1.gif

    A click on a node would allow the user to define the childs nodes ....

    I don't know how to proceed ....

    Any ideas ?

    Thanks a lot for yours answers

    Marie
    MC, Aug 15, 2005
    #1
    1. Advertising

  2. On Mon, 15 Aug 2005 16:51:07 +0200, MC wrote:

    > I'm working on a struts web application. I've to develop a screen ..


    Do you mean 'develop a web page'? Oh, wait..
    "Sub: How to build a tree in a jsp ?"
    (please repeat all important words from subject in body -
    some people don't read 'subject' lines)

    A web page might still be done with DHTML (HTML and
    JavaScript) or an applet.

    >..in
    > order to construct and/or modify a hierarchical structure (typically a
    > DOM tree) of the following type:
    > http://www.oracle.com/technology/oramag/oracle/03-sep/images/o53xml_f1.gif


    As mentioned in this article?
    <http://www.oracle.com/technology/oramag/oracle/03-sep/o53devxml.html>

    How did you come by that image?

    > A click on a node would allow the user to define the childs nodes ....
    >
    > I don't know how to proceed ....


    Where are you now?

    I ask because developing web-applications is not easy,
    but it also seems to be attracting a lot of people who
    have little experience in Java (or debugging, or web
    development..)

    It almost sounds as though this page might get you kick started.
    <http://home.earthlink.net/~patricia_shanahan/beginner.html>

    [ Note: Follow-Ups set to c.l.j.help. ]

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "If I could find the reason, I'd know the answer why" Status Quo
    'Gerdundula'
    Andrew Thompson, Aug 15, 2005
    #2
    1. Advertising

  3. MC

    jan V Guest

    > I don't know how to proceed ....
    >
    > Any ideas ?


    Marie, when you tackle any non-trivial stuff which relies on several
    technologies (Struts, JSP, XML, DOM, .. whatever), you really need to make
    sure you are *comfortable* with each and every one of these *before* you
    design your solution. Did I just write "design your solution" there? Yes I
    did... not code, but design first.

    It seems you're already swimming/drowning in code, without even having
    thought through the design.

    If you're a salaried programmer, you need to go to your manager(s) and ask
    them if you and them can allocate a reasonable amount of time to
    self-learning of technologies BEFORE continuing on your project.
    jan V, Aug 15, 2005
    #3
  4. jan V wrote:
    >>I don't know how to proceed ....
    >>
    >>Any ideas ?

    >
    >
    > Marie, when you tackle any non-trivial stuff which relies on several
    > technologies (Struts, JSP, XML, DOM, .. whatever), you really need to make
    > sure you are *comfortable* with each and every one of these *before* you
    > design your solution. Did I just write "design your solution" there? Yes I
    > did... not code, but design first.
    >
    > It seems you're already swimming/drowning in code, without even having
    > thought through the design.
    >
    > If you're a salaried programmer, you need to go to your manager(s) and ask
    > them if you and them can allocate a reasonable amount of time to
    > self-learning of technologies BEFORE continuing on your project.
    >
    >


    One can also assume that we are not dealing with a complete moron here,
    and that the question simply is; How to best represent an editable,
    hierarchical structure on the web. It is not given that a programmer
    fluent in Strus, JSP, XML, DOM ... whatever, really has a ready solution
    for that up his/hers nose. I use all those technologies on a daily
    basis, and still I'd appreciate some input if I were to implement a
    tree/hierarchy-editor for the web.

    I think the requirements for the actual GUI/representation must be
    worked out here. HTML, Applet, Gif-image? How nice and slick must the
    layout be? Interaction considerations; How to add a new node;
    Right-click menu or [Add Child]/[Add Siebling] submit buttons for each node?

    Is it acceptable to represent the tree-structure in an explorer-like
    view? If yes, it should be possible to re-use some existing code from
    the web. After all, such tree-structures are used commonly for hierarchy
    navigation (catalogs, site-structures, etc.). Different web frameworks
    also have such components pre-defined, that could be extended/subclassed.

    --
    jon martin solaas
    Jon Martin Solaas, Aug 16, 2005
    #4
  5. MC

    jan V Guest

    > > If you're a salaried programmer, you need to go to your manager(s) and
    ask
    > > them if you and them can allocate a reasonable amount of time to
    > > self-learning of technologies BEFORE continuing on your project.

    >
    > One can also assume that we are not dealing with a complete moron here,


    I always assume this. Morons never even get stranded on the shores of
    c.l.j.p by accident ;-)

    > and that the question simply is; How to best represent an editable,
    > hierarchical structure on the web.


    As an ex-video games programmer, you'll excuse me for saying that I hate the
    current madness of trying to shoehorn every possible application into
    f*cking web browsers. Maybe I'm part of a small minority, but I still
    believe in standalone applications... applications in which simple-ish
    things like interactive tree GUIs don't pose massive design decisions which
    risk the whole success or failure of a project !

    Browsers are brilliant for PAGES... but IMO they are not a suitable medium
    for complex applications.. especially not those requiring non-trivial GUIs
    (e.g. one containing an editable tree for starters...)

    I mean, we're all Java programmers, so we can write standalone executables
    which run on most popular platforms... so please, what am I missing? Why
    does every tom, dick and harry application have to be a "web app"?? So that
    virus and adware writers have a nice fat, static target to hit all the time?
    jan V, Aug 17, 2005
    #5
  6. On Wed, 17 Aug 2005 21:25:59 GMT, jan V wrote:

    > Browsers are brilliant for PAGES... but IMO they are not a suitable medium
    > for complex applications..


    I largely agree.

    > I mean, we're all Java programmers, so we can write standalone executables
    > which run on most popular platforms... so please, what am I missing? Why
    > does every tom, dick and harry application have to be a "web app"??


    I think a lot of people have remote data and begin
    immediately to think of accessing it 'via the net',
    which in turn leads to the follow on 'by browser'.

    Unfortuanately, too often people ask how do I connect
    inappropriate technology 'a' to inappropriate technology 'b',
    only to have a number of people rush un with 'the answer'
    rather than stopping to question if the OP has any idea
    what they are doing.

    Jon Martin Solaas
    >> One can also assume that we are not dealing with a complete moron here,


    Not a comment directly on this thread, but that does
    seem like a rash assumption for a message cross-posted
    to c.l.j.programmer and c.l.j.help.

    There are posts made to c.l.j.programmer alone that show the
    classic signs of 'a fundamental and profound lack of inexperience'
    (let's not call them morons).

    Note. Follow-Ups set to c.l.j.programmer only.

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "Everybody's groovin' to their own song."
    Josh Abrahams/Amiel Daemion 'Addicted to Bass'
    Andrew Thompson, Aug 18, 2005
    #6
  7. On Thu, 18 Aug 2005 02:44:50 GMT, Andrew Thompson wrote:

    > There are posts made to c.l.j.programmer alone that show the
    > classic signs of 'a fundamental and profound lack of inexperience'


    ...lack of 'experience'. (oops)

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "When you believe in things that you don't understand, you suffer.
    Superstition ain't the way"
    Stevie Wonder 'Superstitious'
    Andrew Thompson, Aug 18, 2005
    #7
  8. MC

    jan V Guest

    > > I mean, we're all Java programmers, so we can write standalone
    executables
    > > which run on most popular platforms... so please, what am I missing? Why
    > > does every tom, dick and harry application have to be a "web app"??

    >
    > I think a lot of people have remote data and begin
    > immediately to think of accessing it 'via the net',
    > which in turn leads to the follow on 'by browser'.


    Remote data? Fine. Access via the Net? Fine. I say TCP/IP. Java makes it
    incredibly easy to connect to anything on the net. Give people Swing-based
    standalone apps that connect to the data via the Net.

    None of this crippling HTML nonsense to design what looks like a normal
    standalone GUI (if creating Java AWT/Swing layouts can sometimes be an art,
    then how much more so is creating decent GUIs using HTML - a technology
    which was never even designed for page layout!).

    None of this "We implore you not to press the back button because we have
    problems tracking you otherwise. Our session cookies will get messed up"
    nonsense.

    None of this "Oh f*ck, now this browser is flavour of the day, and its
    JavaScript flavour breaks our web app.". Or "Damn, the Mac is becoming
    popular again, so now we've got to start supporting Safari too."

    And what about security ? The world's main browser (IE) is target #1 for
    keylogger malware, and porn/pills/scam adware, so you're actually forcing
    your users to use a "platform" which exposes them to the will of the scum of
    the earth. It's like saying to your users, here's our new program, but you
    can only use it if you go and stand in the middle of the red light district
    where all the junkies, pimps and muggers hang out. Enjoy our program, but
    watch out for those needles.. you might catch AIDS from them. Ha !
    jan V, Aug 18, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ramkumar Menon

    B+ Tree versus Ternary Search Tree

    Ramkumar Menon, Aug 16, 2005, in forum: Java
    Replies:
    2
    Views:
    1,585
    Roedy Green
    Aug 16, 2005
  2. Ramkumar Menon

    B+ Tree versus Ternary Search Tree

    Ramkumar Menon, Aug 16, 2005, in forum: Java
    Replies:
    0
    Views:
    421
    Ramkumar Menon
    Aug 16, 2005
  3. Ramkumar Menon

    B+ Tree versus Ternary Search Tree

    Ramkumar Menon, Aug 16, 2005, in forum: Java
    Replies:
    1
    Views:
    439
    Andrew Thompson
    Aug 16, 2005
  4. Replies:
    0
    Views:
    4,331
  5. Stub

    B tree, B+ tree and B* tree

    Stub, Nov 12, 2003, in forum: C Programming
    Replies:
    3
    Views:
    10,091
Loading...

Share This Page