I think you know that for radio button group you have to map a selectitems Array for values to be displayed in the UI.if you want to display 3 values:
for(...........)
new SelectItem("i", "option"+i);
build this array without the value u want to hide.
here you wont have the availability of the hiddenvalue,so u have to put explicitly some hidden field and use that for your purposes.
Is this the one or a different scenario?
Hi Raju,
Thanks for your reply.
But actually what I want is, I want to make one radio button of the radio button group as hidden. I don't want another hidden field.
As you said how to create radio button group, in that i need one radio button as hidden.
Please send me the code if there is a solution.
Thank You.
Hi Raju,
I tried with that. But it's displaying the radio button without label on the page. I am unable to disable one of the select item.
Actually what I want to do is, when I select a radio button of a radio button group 1, the selected radio button of other radio button group 2 should be deselected. I tried with java script. But, when the page get submitted again the deselected radio button is being selected. Because of that I want to create a hidden radio button.
1. If youhad a solution for this creation of hidden radio button in a radio button group tell me.
OR
2. Tell me the method to deselect a radio button in the backing bean.
Thank you.
u can do it by java script ,and you will find many if u google it.
The other thing is if you unselect the other radio button and hit the server
you will get --" Value is not a valid option " error .You can check if u want.
And you need to handle it correctly and work out ur code.
for java script -- onclick() method..
.var cmp = document.getelementbyid("");
blah....blah...google it......
.