Author |
Message |
04/09/2009 15:59:57
|
schmuck
Power User
Joined: 08/04/2008 16:27:16
Messages: 83
Offline
|
Hello,
I've got 2 radio buttons. Same group, uniqe refvalue and connected to an value property (string).
First the value is initialized with "String container = null". So none of the two radio buttons is selected. -> The user has to choose one!
After pressing a finish button, my mask is cleared an also the container value is switched back to null. -> But the last selected radiobutton is still selected!
Is this a bug? It should not be selected, because the refvalue of this button equals not the assigned value property (container).
regards,
Michael Schmuck
|
|
|
04/09/2009 16:44:31
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
...just checking...
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
04/09/2009 17:04:36
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
this is a "feature" of the Swing Radio Button Group... - after being selected one IS selected...
Initially, all buttons in the group are unselected. Once any button is selected, one button is always selected in the group. There is no way to turn a button programmatically to "off", in order to clear the button group.
There are some proposals to add an invsible radio button to the group for explicitly switching off the others. We will check... Currenlty you need to define a third one with null-value ("default radio button")...
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
28/05/2013 13:50:22
|
slist
Power User
Joined: 20/03/2013 14:13:15
Messages: 37
Location: Berlin
Offline
|
Hi,
we've got the same problem here. Obviously, defining a third radio button and setting its rendered attribute to false does not work here. (I assume that Swing cannot access the third button because it is simply not there?).
So is there another alternative? Our customer explicitly does not want to have a third NULL-radio button. :-/
BR
|
|
|
29/05/2013 07:45:00
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
...the RENDERED attribute is managed on server side - i.e. the controls that are not rendered are not sent to the client at all.
I believe what you want to do is to have a dummy radio button which is selected in certain situations, but which is not visible to the user.
In this case: defined RADIOBUTTON, define WIDTH and HEIGHT of "0", and define FOCUSABLE to "false".
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
|