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 17:18:22 UTC

Radio button CHECKED ???

How to use the <html:radio> tag and define a specific radio with CHECKED by default ?

p.e <input type="radio" name="radiobutton" value="1" checked>

thanks


RE: Radio button CHECKED ???

Posted by Leticia Golubov <lg...@micromuse.com>.
what if the actionForm is DynaActionForm?  I have an html:radio tag and
can't seem to select one! :(

so the tags <html:radio property="m_Action" value="true"
onclick="EnablePing();" />Enable
              <html:radio property="m_Action" value="false"
onclick="DisablePing();" />Disable

will show radio buttons but none of them will be checked...

-----Original Message-----
From: Christian Bollmeyer [mailto:java@christianbollmeyer.de]
Sent: 21 January 2004 19:49
To: Struts Users Mailing List
Subject: Re: Radio button CHECKED ???


Am Mittwoch, 21. Januar 2004 11:17 schrieb Mauricio T. Ferraz:
> 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?

Check the ActionForm: what is "propertyName" initialized to
there? I bet it is "false".

> thanks

HTH,
-- Chris.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Radio button CHECKED ???

Posted by Christian Bollmeyer <ja...@christianbollmeyer.de>.
Am Mittwoch, 21. Januar 2004 11:17 schrieb Mauricio T. Ferraz:
> 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?

Check the ActionForm: what is "propertyName" initialized to
there? I bet it is "false". 

> thanks

HTH,
-- Chris.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Radio button CHECKED ???

Posted by "Mauricio T. Ferraz" <ma...@cilix.com.br>.
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