Hidden Radio Button

Hi,I had a radio button group. I want to make one radio button of the radio button group as hidden. Is there any way to create a radio button group with one hidden radio button.If there is any solution give me reply.Thank You.
[254 byte] By [Ramesh_Pappalaa] at [2007-10-3 0:50:26]
# 1
build the radio button select items with required values only.raju
rajureddya at 2007-7-14 17:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Hi Raju,Can you give me an example.Thank you.
Ramesh_Pappalaa at 2007-7-14 17:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

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?

rajureddya at 2007-7-14 17:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

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.

Ramesh_Pappalaa at 2007-7-14 17:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
if there are 3 elements then first one :new selectitem("1","");- with no label so nothing gets rendered in UI ,but you have a value when selectedfor(i=1;....)new selectitem(i,"opttion"+i);can i know what is the motive behind this?
rajureddya at 2007-7-14 17:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

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.

Ramesh_Pappalaa at 2007-7-14 17:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7

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......

.

rajureddya at 2007-7-14 17:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...