on 10-19-2005 4:33 PM
Does anyone know how to retrieve the ID of the selected RadioButton in a RadioButtonGroup? When i find the selected RadioButton and do call getId() I get something weird, that references the group and a random letter set. If I do a getValueAsDataType().toString() I get "true."
How do you find the ID value for the selected RadioButton....that ID that you defined in the JSP?
Thanks!
Thanks, Praksh, but rb.getKey() gives me the <b>key</b> attribute value for the RadioButton. I am looking for the <b>id</b> attribute value for the RadioButton.
Do you know how to find this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexa,
According to the API documentation for the radioButton, the key attribute for a radioButton is:
key
A string which is assigned to the radioButton when the form is sent to the server. A key string must be defined and must not be empty.
id
Identification name of the radioButton.
Can you set key and id to the same value? If not, are you populating the id and key attributes from a bean array? If so, you could always get the radio button id by grabbing the key and then cross referenceing (i.e. keep id at position 0 and key at position 1 in your radio button setup array).
Hope this helps,
Marty
User | Count |
---|---|
74 | |
10 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.