myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sandeep gururaj" <>
Subject RE: [Trinidad] bundle for selectOneChoice,
Date Fri, 24 Aug 2007 08:31:43 GMT
Hello Darren,


Good question! I see 2 problems here.


Firstly, tr:selectItem represents a single item. I am not sure how to
use it for a list of items. May be you can try with f:selectItems, whose
value is a list of SelectItems.


Secondly, to fetch the value for a given key from properties file,
ResourceBundle.getString(key) is used. This returns only String objects.
So, there's no way one can get an array or list. In your example, you
get "London,Dublin,Glasgow" as a single item.


To solve your problem, you need a list in your bean and a solution to
the second problem. You can try any of the methods suggested on the
related topic in Sun Developer Network


Hope this helps!




From: Darren McEntee [] 
Sent: Thursday, August 23, 2007 9:16 PM
To: MyFaces Discussion
Subject: [Trinidad] bundle for selectOneChoice,


Hi guys, 


Quick question...

I thought I seen this somewhere but can't seem to locate it now...


I'm interested in populating the drop down values of a
tr:selectOneChoice component with values in a bundle.

This works great for single items like labels and naming convention


But can a file contain a list, like a key-value pair
with multiple values:






        <tr:selectOneChoice label="#{bundle.City}"

            <tr:selectItem label="#{bundle.SelectCity}"/>



Just wondering if this is possible...



P Please consider the environment before printing this email 

1. The information contained in this E-mail, including any files
transmitted with it, is confidential and may be legally privileged. This
E-mail is intended only for the personal attention of the stated
addressee(s). Any access to this E-mail, including any files transmitted
with it, by any other person is unauthorised. If you are not an
addressee, you must not disclose, copy, circulate or in any other way
use or rely on the information contained in this E-mail or any files
transmitted with it. Such unauthorised use may be unlawful. If you have
received this E-mail in error, please inform the sender immediately and
delete it and all copies from your system. You may not forward this
E-mail without the permission of the sender.
2. The views expressed in this E-mail are those of the author, and do
not necessarily represent the views of AMT-SYBEX. Internet
communications are not secure and AMT-SYBEX cannot, therefore, accept
legal responsibility for the contents of this message nor for any damage
caused by viruses. 

AMT-SYBEX Limited is a UK company, registration number GB03036807 at
address The Spirella Building, Bridge Road, Letchworth, SG6 4ET.  

AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at
address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
For more information on the AMT-SYBEX Group visit <> 

View raw message