Good point. I had forgotten about that class (added in JDK 1.4).
On Tue, 08 Mar 2005 11:18:50 -0500, Nidel, Mike <[EMAIL PROTECTED]> wrote:
> Note that there's also the java.util.LinkedHashMap which will
> maintain whichever order you insert the values in. This gives
--
Jeff Beal
Webmedx, Inc.
PROTECTED]
> Sent: Tuesday, March 08, 2005 9:34 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Displaying a HashMap as a
>
>
> Even if the results coming out of the database are sorted, throwing
> them into a non-sorted Collection, like a basic HashMap, wi
Even if the results coming out of the database are sorted, throwing
them into a non-sorted Collection, like a basic HashMap, will un-sort
them. If you use a List, you just preserve the database sort order.
If you use a TreeMap, you can get the same sort order, but the TreeMap
object will go throu
my thought was just to let the DB do the work on the sorting. Is that bad?
On Mon, 7 Mar 2005 21:29:08 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> From: "James Mitchell" <[EMAIL PROTECTED]>
> > I wouldn't use a Map, I would go with a List. Primarily for ordering.
>
> I use java.util.TreeMap
From: "James Mitchell" <[EMAIL PROTECTED]>
I wouldn't use a Map, I would go with a List. Primarily for ordering.
I use java.util.TreeMap-- automatic alphabetical order for my lists of
(String) codes and descriptions.
--
Wendy Smoak
-
ot;
Sent: Monday, March 07, 2005 11:33 AM
Subject: Displaying a HashMap as a
Hi all
I have a HashMap in my application context called "codes" that
contains a bunch of key,value pairs where the key is an Integer
representing the codeID and the value is a string representing the
Thanks Wendy!
My problem was the following. In order to get this to
display, I of course needed to set up all the crap asociated with
doing such a thing... This is a list partially to get it into the
archives so I can search on it later.
So, I did the following
1. Loaded an ArrayList of CodeBean
From: "David Johnson" <[EMAIL PROTECTED]>
> I simply want to create a select box containing all the items in my
> HashMap (displaying the codeName but passing the codeID)
> What's the easiest way to do this? Can I do this wil just a vanilla
> HashMap? The examples are slightly confusing.
I agree..
Hi all
I have a HashMap in my application context called "codes" that
contains a bunch of key,value pairs where the key is an Integer
representing the codeID and the value is a string representing the
codeName
I simply want to create a select box containing all the items in my
HashMap (displaying
9 matches
Mail list logo