[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Bug in radio button?  XML
Forum Index -> Development
Author Message
schmuck

Power User
[Avatar]

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
[ICQ]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

...just checking...
Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

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
slist

Power User
[Avatar]

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
CaptainCasa

Power User
[Avatar]

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
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team