From: "Marc Ende" <[EMAIL PROTECTED]>
I'm using the <html:optioncollection ...> only with collections. Now I
need
to order the contents. It's possible to assign anything else
(orderable/sortable) than collections to this tag?
What are you using now, and what do you need it to do?
This works with a TreeMap to keep things in alphabetical order:
<html-el:select property="type">
<html-el:options collection="contactTypes" property="key"
labelProperty="value"/>
</html-el:select>
I'm also using LRUMap from Commons Collections to display a list with a
fixed size from least-to-most recently used, though those are just links,
not <options>.
There's probably a collection that will do what you want, either in the JDK
or in Commons. And if it's a List, you can write a Comparator and call
Collections.sort(List,Comparator) before you place it in scope for the
<options> tag.
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]