Hi everyone,
I have a very strange problem that's making me getting out of mind.
In my JSF page, I put a RadioButtonGroup like this:
<webuijsf:radioButtonGroup binding="#{MyPage.myRadioButton}" columns="3" id="myRadioButton" items="#{MyPage.myRadioButtonDefaultOptions.options}" selected="#{MyPage.myRadioButtonDefaultOptions.selectedValue}"/>
The RadioButtonGroup should contain 3 elements, and that's ok.
Since the default options for this component were "Item 1, Item 2, item 3", I right-clicked on the component, clicked on "Configure Default Options..." and changed them to my needs.
Once default options got changed, I could see my new custom values both in the Visual Designer and in the browser preview, but when I compile my project, deploy the application and run it in my browser, I see the old default values again!!! How can this happen?!?
As you can see, the code generated by the NetBeans IDE is right, I mean:
...
private void _init() throws Exception
{
// these are my custom values, not the default ones
myRadioButtonDefaultOptions.setOptions(new Option[]{new Option("0", "All"), new Option("1", "Friends"), new Option("2", "None")});
attachmentRadioButtonDefaultOptions.setSelectedValue("0"); // this is kindly *IGNORED*
}
...
So why do I still see the default values?!? This is driving me mad...
Furthermore, if I try to print something about the selected radiobutton, I always get "null" as response.
System.out.println("Selected: "+myRadioButton.getValue()); // this prints "null"...
System.out.println("Selected: "+myRadioButton.getSelected()); // ... and this also :-(
Thank you so much, I really need some help!
Edited by: d1s4st3r on May 26, 2008 6:24 AM