struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Burgess <RBurg...@nuvox.com>
Subject Re: How to preselect a radio button in Struts 2
Date Thu, 15 Nov 2007 14:01:10 GMT
Here is a working example.

<s:radio list="#{1:'Yes', 2:'No'}" value="${u.access_lvl_types_id}"
name="users(${u_rowNum}).access_lvl_types_id"/>

The value coming from the bean is always 1 or 2.

HTH

Regards,
Randy Burgess
Web Applications Developer
Nuvox Communications



> From: Pankaj Gupta <pankaj.hughes@gmail.com>
> Reply-To: Struts Users Mailing List <user@struts.apache.org>
> Date: Thu, 15 Nov 2007 11:53:53 +0530
> To: Struts Users Mailing List <user@struts.apache.org>
> Subject: Re: How to preselect a radio button in Struts 2
> 
> Hi,
> I tried the same. But it didn't worked
> <s:radio label="Courtesy Call  Requested" name="courtesyCallFlag"
> list="{'Yes','No'}" value="No" required="true" />
> Regards,
> Pankaj
> 
> 
> On 11/14/07, Randy Burgess <RBurgess@nuvox.com> wrote:
>> 
>> Use the value attribute and the radio button with that value will be
>> selected.
>> 
>> <s:radio name="r1" value="<some ognl value>" list="<some ognl list/map>"/>
>> 
>> Regards,
>> Randy Burgess
>> Web Applications Developer
>> Nuvox Communications
>> 
>> 
>> 
>>> From: Pankaj Gupta <pankaj.hughes@gmail.com>
>>> Reply-To: Struts Users Mailing List <user@struts.apache.org>
>>> Date: Wed, 14 Nov 2007 10:42:20 +0530
>>> To: <user@struts.apache.org>
>>> Subject: How to preselect a radio button in Struts 2
>>> 
>>> Hi,
>>> I am working on Struts 2 and I want to preselect  a radio button.
>>> If somebody can let me know how to go about it.
>>> Regards,
>>> Pankaj
>> 
>> 
>> 
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information.  If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to read,
>> copy, or distribute it, and we ask that you please delete it (including all
>> copies) and notify the sender by return email.  Delivery of this Message to
>> any person other than the intended recipient(s) shall not be deemed a waiver
>> of confidentiality and/or a privilege.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
>> 



This email and any attachments ("Message") may contain legally privileged and/or confidential
information.  If you are not the addressee, or if this Message has been addressed to you in
error, you are not authorized to read, copy, or distribute it, and we ask that you please
delete it (including all copies) and notify the sender by return email.  Delivery of this
Message to any person other than the intended recipient(s) shall not be deemed a waiver of
confidentiality and/or a privilege.

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


Mime
View raw message