You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Mahendra K. Kutare" <mk...@sapient.com> on 2003/10/15 15:59:37 UTC
How to i make the default selection of radio button
Hi all,
I am facing an issue of default selecting a radio button in struts.
I have written code to create two radio button, but i want one of them
to be default selected.
Can anyone help me on this ? How to achieve this default selection of
one of the radio buttons.
Thanks and regards
Mahendra
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: How to i make the default selection of radio button
Posted by Barry Volpe <st...@childrencare.com>.
In your Action:
If using DynaValidatorForm:
DynaValidatorForm eForm = (DynaValidatorForm)form;
eForm.set("radioButtonName","radioButtonValue"));
now foward to your form and the radio button will be selected.
If using a Form:
nameOfForm eForm = new nameOfForm();
eForm.setRadioButtonName("radioButtonValue");
now foward to your form and the radio button will be selected.
Barry
----- Original Message -----
From: "Mahendra K. Kutare" <mk...@sapient.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, October 15, 2003 6:59 AM
Subject: How to i make the default selection of radio button
Hi all,
I am facing an issue of default selecting a radio button in struts.
I have written code to create two radio button, but i want one of them
to be default selected.
Can anyone help me on this ? How to achieve this default selection of
one of the radio buttons.
Thanks and regards
Mahendra
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: How to i make the default selection of radio button
Posted by Greg Dunn <gr...@mo.nisc.cc>.
Set the ActionForm property representing the radio button to equal the value
on the individual button you want selected.
Greg
-----Original Message-----
From: Mahendra K. Kutare [mailto:mkutare@sapient.com]
Sent: Wednesday, October 15, 2003 9:00 AM
To: Struts Users Mailing List
Subject: How to i make the default selection of radio button
Hi all,
I am facing an issue of default selecting a radio button in struts.
I have written code to create two radio button, but i want one of them
to be default selected.
Can anyone help me on this ? How to achieve this default selection of
one of the radio buttons.
Thanks and regards
Mahendra
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org