How to build a tree in a jsp ?

A

Andrew Thompson

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. ]
 
J

jan V

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

Jon Martin Solaas

jan said:
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.
 
J

jan V

If you're a salaried programmer, you need to go to your manager(s) and
ask
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?
 
A

Andrew Thompson

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

Andrew Thompson

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'
 
J

jan V

I mean, we're all Java programmers, so we can write standalone
executables
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 !
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top