RE: Looping a tree-structure of objects of unknown depth

2003-02-14 Thread Heinonen Jani
You can define methods inside a JSP, when you use the declaration block. 

The regular JSP code goes to the service method of the servlet, whereas
things in the declaration block are object/class wide.
Of course, this is something that we are trying to avoid by using tag
libraries. At worst, we end up with applications where all of the logic is
in JSP's.

%!
  public void myMethod(Object someParameter) {
 ...
  }
%

-Original Message-
From: Sakke Wiik [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 14, 2003 12:41 PM
To: [EMAIL PROTECTED]
Subject: Looping a tree-structure of objects of unknown depth


I have a tree-structure of objects similar to a filesystem, where
directories has subdirectories to an unknown depth. How can i loop and
display all these in jsp without knowing the 
depth of the tree? it's easy to do in pure java with a method calling
itself, but I can't use methods inside a jsp, or can I?

cheers,
Sakke Wiik

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: select tag in input tag library

2003-01-27 Thread Heinonen Jani

The key is to use a HashMap implementation that returns entries in a
specific order, the insertion order, in particular.  If you use the
Commons-Collections library, you'll find the SequencedHashMap class,
which will do exactly that.

Or you could use java.util.LinkedHashMap from JDK 1.4 onwards.

Regarding the input tag library, has anyone else noticed that it tends to
create duplicate value attributes at least with bean properties? This can be
a problem with XHTML as some browsers refuse to render the page altogether.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]