aspose file tools*
The moose likes Struts and the fly likes html:options tag, How can I sort the options? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:options tag, How can I sort the options?" Watch "html:options tag, How can I sort the options?" New topic
Author

html:options tag, How can I sort the options?

Jinesh Shah
Greenhorn

Joined: Oct 17, 2005
Posts: 10
Hi:
I am a newbie to Struts and am using htmlptions tag to display options on a web-page. Is there any way to sort the options displayed by this tag, say, by setting an attribute or something?? Please let me know.
Thanks in advance for your help!


SCJP, SCWCD
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

The tag can not sort your collection. Your collection must be sorted before you come to the page.


A good workman is known by his tools.
Jinesh Shah
Greenhorn

Joined: Oct 17, 2005
Posts: 10
Cool...Thanks for you input!
Iftikhar Arain
Ranch Hand

Joined: Jul 17, 2002
Posts: 95

AbstractList, ArrayList, LinkedList, Vector

you can sort all above list with following method.

Collections.sort(list);

Regards.


SCJP,SCWCD,IBM UML,FLEX & AIR,MCAD,MCSD, Adobe ACE
Jinesh Shah
Greenhorn

Joined: Oct 17, 2005
Posts: 10
Thanks! I did it exactly the way you suggested yesterday and submitted my code
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:options tag, How can I sort the options?
 
Similar Threads
html:options tag
struts: html:options tag not working
html:options
html:options onclick
html:options?