From: Bolutiwi, Olu [mailto:[EMAIL PROTECTED]
> I am selecting a list of town names and ids from the database (sorted
> by town name) and adding them to a TreeMap  or HashMap.  TreeMap sorts

> by key (in this case its my ids from the database) and HashMap messes 
> up the sort order.
> 
> How can I use a collection that supports key & value, keep it sorted
> and use it in my html:select without messing up the sort order.

Use a different Comparator when you instantiate your TreeMap.

Html:select is just a thin wrapper around the standard HTML tags...
Sorting must be handled elsewhere (or create or use a custom tag).

Dave


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

Reply via email to