Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 67102 invoked from network); 8 Jul 2009 21:17:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Jul 2009 21:17:59 -0000 Received: (qmail 88640 invoked by uid 500); 8 Jul 2009 21:18:08 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 88588 invoked by uid 500); 8 Jul 2009 21:18:08 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 88580 invoked by uid 99); 8 Jul 2009 21:18:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2009 21:18:08 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.184.111.61] (HELO am3.baremetal.com) (208.184.111.61) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2009 21:17:57 +0000 Received: from 4dmw23 (cmr-208-124-147-234.cr.net.cable.rogers.com [208.124.147.234]) by am3.baremetal.com (8.14.2/8.14.2) with ESMTP id n68LGjva010162 for ; Wed, 8 Jul 2009 14:16:46 -0700 From: "Mike Quentel" To: "'MyFaces Discussion'" Subject: Sorted SelectItem objects in selectOneChoice Date: Wed, 8 Jul 2009 17:15:16 -0400 Message-ID: <006b01ca0011$31a484f0$94ed8ed0$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006C_01C9FFEF.AA92E4F0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcoAETCblV8F6ArwTLS+5ShgsbRNwg== Content-Language: en-ca X-Scanned-By: MIMEDefang 2.36 X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------=_NextPart_000_006C_01C9FFEF.AA92E4F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Using JSF 1.2 and Trinidad... selectOneChoice drop down selection lists are dynamically populated from lookup tables in a database. An ArrayList stores SelectItem objects. Does anyone know how to make selectOneChoice sorted, other than via the actual SQL query (" ORDER BY ")? I tried using some of the java.util.Collections classes, but did not get this to work. Thanks, Mike Quentel ------=_NextPart_000_006C_01C9FFEF.AA92E4F0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Using JSF 1.2 and Trinidad...

 

selectOneChoice drop down selection lists are = dynamically populated from lookup tables in a database.  An ArrayList stores SelectItem objects.

 

Does anyone know how to make selectOneChoice = sorted, other than via the actual SQL query (“ ORDER BY “)?

 

I tried using some of the java.util.Collections = classes, but did not get this to work.

 

Thanks,

 

Mike Quentel

 

------=_NextPart_000_006C_01C9FFEF.AA92E4F0--