Thanks much appreciated -----Original Message----- From: Puneet Lakhina [mailto:[EMAIL PROTECTED] Sent: 04 January 2007 19:47 To: Struts Users Mailing List Subject: Re: html:select and sorting
On 1/4/07, Bolutiwi, Olu <[EMAIL PROTECTED]> wrote: > > Hi all, I have the same issue. > > 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. I suppose you are looking for LinkedHashMap http://java.sun.com/j2se/1.4.2/docs/api/java/util/LinkedHashMap.html It keeps the keys in the order in which they were inserted in the map that should keep you database ordering intact. hope it helps > Cheers > > > -----Original Message----- > From: Ranjan Kumar Baisak [mailto:[EMAIL PROTECTED] > Sent: 04 January 2007 15:30 > To: Struts Users Mailing List > Subject: html:select and sorting > > Hi, > Is there any way to sort all the elements while using html:select? > > -R > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > PLEASE NOTE: THE ABOVE MESSAGE WAS RECEIVED FROM THE INTERNET. > On entering the GSI, this email was scanned for viruses by the > Government Secure Intranet (GSi) virus scanning service supplied > exclusively by Cable & Wireless in partnership with MessageLabs. > In case of problems, please call your organisational IT Helpdesk. > The MessageLabs Anti Virus Service is the first managed service to > achieve the CSIA Claims Tested Mark (CCTM Certificate Number > 2006/04/0007), the UK Government quality mark initiative for > information security products and services. For more information > about this please visit www.cctmark.gov.uk > > > This e-mail (and any attachment) is intended only for the attention of > the addressee(s). Its unauthorised use, disclosure, storage or copying > is not permitted. If you are not the intended recipient, please > destroy all copies and inform the sender by return e-mail. > > This e-mail (and any attachment) is intended only for the attention of > the addressee(s). Its unauthorised use, disclosure, storage or copying > is not permitted. If you are not the intended recipient, please > destroy all copies and inform the sender by return e-mail. > > This e-mail (whether you are the sender or the recipient) may be > monitored, recorded and retained by the Department For Constitutional > Affairs. E-mail monitoring / blocking software may be used, and e-mail > content may be read at any time. You have a responsibility to ensure > laws are not broken when composing or forwarding e-mails and their > contents. > > > This e-mail (and any attachment) is intended only for the attention of > the addressee(s). Its unauthorised use, disclosure, storage or copying > is not permitted. If you are not the intended recipient, please > destroy all copies and inform the sender by return e-mail. > > This e-mail (and any attachment) is intended only for the attention of > the addressee(s). Its unauthorised use, disclosure, storage or copying > is not permitted. If you are not the intended recipient, please > destroy all copies and inform the sender by return e-mail. > > This e-mail (whether you are the sender or the recipient) may be > monitored, recorded and retained by the Department For Constitutional > Affairs. E-mail monitoring / blocking software may be used, and e-mail > content may be read at any time. You have a responsibility to ensure > laws are not broken when composing or forwarding e-mails and their contents. > > The original of this email was scanned for viruses by Government > Secure Intranet (GSi) virus scanning service supplied exclusively by > Cable & Wireless in partnership with MessageLabs. > On leaving the GSI this email was certified virus free. > The MessageLabs Anti Virus Service is the first managed service to > achieve the CSIA Claims Tested Mark (CCTM Certificate Number > 2006/04/0007), the UK Government quality mark initiative for > information security products and services. For more information > about this please visit www.cctmark.gov.uk > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Puneet PLEASE NOTE: THE ABOVE MESSAGE WAS RECEIVED FROM THE INTERNET. On entering the GSI, this email was scanned for viruses by the Government Secure Intranet (GSi) virus scanning service supplied exclusively by Cable & Wireless in partnership with MessageLabs. In case of problems, please call your organisational IT Helpdesk. The MessageLabs Anti Virus Service is the first managed service to achieve the CSIA Claims Tested Mark (CCTM Certificate Number 2006/04/0007), the UK Government quality mark initiative for information security products and services. For more information about this please visit www.cctmark.gov.uk This e-mail (and any attachment) is intended only for the attention of the addressee(s). Its unauthorised use, disclosure, storage or copying is not permitted. If you are not the intended recipient, please destroy all copies and inform the sender by return e-mail. This e-mail (and any attachment) is intended only for the attention of the addressee(s). Its unauthorised use, disclosure, storage or copying is not permitted. If you are not the intended recipient, please destroy all copies and inform the sender by return e-mail. This e-mail (whether you are the sender or the recipient) may be monitored, recorded and retained by the Department For Constitutional Affairs. E-mail monitoring / blocking software may be used, and e-mail content may be read at any time. You have a responsibility to ensure laws are not broken when composing or forwarding e-mails and their contents. This e-mail (and any attachment) is intended only for the attention of the addressee(s). Its unauthorised use, disclosure, storage or copying is not permitted. If you are not the intended recipient, please destroy all copies and inform the sender by return e-mail. This e-mail (and any attachment) is intended only for the attention of the addressee(s). Its unauthorised use, disclosure, storage or copying is not permitted. If you are not the intended recipient, please destroy all copies and inform the sender by return e-mail. This e-mail (whether you are the sender or the recipient) may be monitored, recorded and retained by the Department For Constitutional Affairs. E-mail monitoring / blocking software may be used, and e-mail content may be read at any time. You have a responsibility to ensure laws are not broken when composing or forwarding e-mails and their contents. The original of this email was scanned for viruses by Government Secure Intranet (GSi) virus scanning service supplied exclusively by Cable & Wireless in partnership with MessageLabs. On leaving the GSI this email was certified virus free. The MessageLabs Anti Virus Service is the first managed service to achieve the CSIA Claims Tested Mark (CCTM Certificate Number 2006/04/0007), the UK Government quality mark initiative for information security products and services. For more information about this please visit www.cctmark.gov.uk --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]