Which radio button is selected when the JSP is displayed depends on the
value of the property in your form bean. For example, if your form bean's
'radioBtn' property is set to "credit", then the second radio button in your
example will appear selected. You should set this up in your Action before
forwarding to the JSP for display.

--
Martin Cooper


----- Original Message -----
From: "Bille Madsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 2:35 AM
Subject: radio select


>
> Hi,
>
> I have the following code:
>
> <html:radio property="radioBtn" value="mail" />
>
> <html:radio property="radioBtn" value="credit" />
> <html:errors property="radioBtn" />
>
> Just two normal radiobuttons, have do I use the 'selected'-option which
html
> provide?
> If the user select one the radio-buttons and come back to the page later,
> none of the radio-buttons are selected, but all other info is still
> presented(struts text-fields and so on).
> By the way, I get the values correct in the formbean, so no problem
there...
>
> Anyone having a answer?
>
> Thanks
>
> Bille
>
>


Reply via email to