You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Adrian Beech <a....@bigpond.net.au> on 2004/09/21 14:31:07 UTC
[INPUT] Generating drop downs with a specific ordering?
G'day,
Is it at all possible to generate a select list (drop down) with a specific
order? For example, I can add the option items to a map like object in a
given sequence (yeah, yeah... I know this doesn't guarantee the order of
access is linear!) but when the control is generated the options are
muddled. I assume the resulting option elements of the select control are
ordered by their corresponding hash code?
Thanks if you can help.
AB
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: [INPUT] Generating drop downs with a specific ordering?
Posted by Kris Schneider <kr...@dotech.com>.
Have you tried using a SortedMap or LinkedHashMap? You could also use something
from Commons Collections like LinkedMap or one of the other OrderedMap
implementations.
Quoting Adrian Beech <a....@bigpond.net.au>:
> G'day,
>
> Is it at all possible to generate a select list (drop down) with a specific
> order? For example, I can add the option items to a map like object in a
> given sequence (yeah, yeah... I know this doesn't guarantee the order of
> access is linear!) but when the control is generated the options are
> muddled. I assume the resulting option elements of the select control are
> ordered by their corresponding hash code?
>
> Thanks if you can help.
>
> AB
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org