You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Mauricio T. Ferraz" <ma...@cilix.com.br> on 2004/01/20 18:32:30 UTC
radio checked???
Help!!
I have a actionForm with a boolean property and set and get
and in my jsp
<html:radio property="propertyName" value="true"/>
<html:radio property="propertyName" value="false"/>
The radio checked always is the second, where is "false". How I put the first to be checked when de jsp is loaded?
thanks
Re: radio checked???
Posted by Otávio Augusto <ot...@bol.com.br>.
Don't know if you got it solved, but i sugest this:
in your ActionForm, have a property called "radio", for instance. Make getRadio and setRadio(String s).
in the property declaration, do it this way: private String radio = "1";
In your jsp, use the radio tags this way:
<html:radio property="radio" value="1"/>
<html:radio property="radio" value="2"/>
the first radio is going to be checked, because its default value is 1 in the ActionForm.
That works for me, I hope it helps you .
Otávio Augusto
On Tue, 20 Jan 2004 15:32:30 -0200
"Mauricio T. Ferraz" <ma...@cilix.com.br> wrote:
> Help!!
> I have a actionForm with a boolean property and set and get
> and in my jsp
> <html:radio property="propertyName" value="true"/>
> <html:radio property="propertyName" value="false"/>
>
> The radio checked always is the second, where is "false". How I put the first to be checked when de jsp is loaded?
>
>
> thanks
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org