struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Harrington <leeb...@gmail.com>
Subject Re: Checking radio button based on object value
Date Wed, 01 Dec 2004 18:44:26 GMT
If you have <html:form name="formBean">

and "fromBean" has properties "optionOne/optionTwo" -- then they
should automatically be valued at whatever the bean properties are.

Lee


On Wed, 1 Dec 2004 18:19:09 -0000, Ciaran Hanley
<ciaran.hanley@sentenial.ie> wrote:
> Hi,
> 
> I have a form consisting of several radio buttons. Upon form generation I
> need radio buttons in the form to be checked based on the attribute of a
> bean stored in the session. If the beans property is true then a particular
> radio button value of "true" should be checked.
> 
> Option One
> 
> <html:radio property="optionOne" value="true" />
> 
> <html:radio property="optionOne" value="false" />
> 
> Option Two
> 
> <html:radio property="optionTwo" value="true" />
> 
> <html:radio property="optionTwo" value="false" />
> 
> I want these preselected based on a bean which has variables corresponding
> to each radio button
> 
> boolean optionOne = false;
> 
> boolean optionTwo = true;
> 
> How can I achieve this?
> 
> Thanks,
> 
> CH
> 
>

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


Mime
View raw message