Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 43211 invoked from network); 31 Oct 2006 15:34:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Oct 2006 15:34:44 -0000 Received: (qmail 17707 invoked by uid 500); 31 Oct 2006 15:34:52 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 17092 invoked by uid 500); 31 Oct 2006 15:34:51 -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 17081 invoked by uid 99); 31 Oct 2006 15:34:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Oct 2006 07:34:51 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of andrew.rw.robinson@gmail.com designates 64.233.162.200 as permitted sender) Received: from [64.233.162.200] (HELO nz-out-0102.google.com) (64.233.162.200) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Oct 2006 07:34:35 -0800 Received: by nz-out-0102.google.com with SMTP id z6so1529736nzd for ; Tue, 31 Oct 2006 07:34:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SyuDODPrIPgoj3GcqwJ2y9Qx7V53+HSZZOkKQSG0vPOtW0a33CLhuxhfQqLEH5JgEVrsTFzjUuP+Njp4MSSW1vjpexnXM/Y/TfQ1bPNguagSgI2BmNo9w4XGSGsTMmn2FhuDSmuFQHpN64Zl90UgQY+WELGS/Cbzfgw76UpRceg= Received: by 10.35.60.16 with SMTP id n16mr6814702pyk; Tue, 31 Oct 2006 07:34:13 -0800 (PST) Received: by 10.35.43.20 with HTTP; Tue, 31 Oct 2006 07:34:13 -0800 (PST) Message-ID: Date: Tue, 31 Oct 2006 08:34:13 -0700 From: "Andrew Robinson" To: "MyFaces Discussion" Subject: Re: Question about creating a dropdown list with dynamic values In-Reply-To: <6dda0b150610310015k511489b8y547c7a5b0ab759d5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <568e62a40610310000q5bfd699w9f71034b5bab4afc@mail.gmail.com> <6dda0b150610310015k511489b8y547c7a5b0ab759d5@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org If you use JBoss-Seam, there is an annotation that you use a normal list (not of select items) to build a drop down [1] [1] http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamSelectItems On 10/31/06, Ernst Fastl wrote: > You could write a method: > > List retval = new ArrayList(); > > for(A a:list) > retval.add(new SelectItem(a.getAttr1() + a.getAttr2() ) ) > > return retval; > > and use this as value for a selecItems-component > > hope that helps > > Ernst > > On 10/31/06, ying lcs wrote: > > i have a list of object , A. And object A has 2 string attributes: attr1, attr2. > > > > How can i create a dropdown select list by combining the string of > > attr1 and string of attr2? > > > > i.e. I want to create a select value option of > > [attr1, attr2] // for each A in the list of A. > > > > Thank you for any help. > > >