users@woodstock.java.net

How to set locale values to radiobutton options

From: d1s4st3r d1s4st3r <d1s4st3r_at_gmail.com>
Date: Tue, 10 Jun 2008 11:52:43 +0200

Hello,

this is my first message on this ML.

I would be pleased to get some help on how to set locale values to
radiobutton options.

In my JSF application I'm using a locale bundle and everything works fine
with all the component, except for a radiobutton.

I tried to use the following code to obtain what I need, but it doesn't work
at all (myMessages is the bundle):

myRadioButtonDefaultOptions.setOptions(*new*
com.sun.webui.jsf.model.Option[]{*new*
com.sun.webui.jsf.model.Option("0", "#{myMessages.All}"), *new*
com.sun.webui.jsf.model.Option("1", "#{myMessages.No_File}"), *new*
com.sun.webui.jsf.model.Option("2", "#{myMessages.With_File}")});
myRadioButtonDefaultOptions.setSelectedValue("0");


When the page gets rendered, the radiobutton default option labels are
wrongly "#{blablabla}" instead of the right values depending on the locale.

Any help would be really appreciated, thanks!


-- 
+-----------------------------------------+
| ~~~[ d1s4st3r ]~~~ |
| --------------------------------------- |
| http://xoomer.alice.it/mental_insomnia/ |
| http://d1s4st3r.blogspot.com/ |
| http://d1s4st3r.deviantart.com/ |
+-----------------------------------------+
| "I live on the edge between the |
| uncertainty and the wrong choice." |
+-----------------------------------------+