I figured it out just after posting the message :)

The mistake was that I had put '' around the boolean values. When I removed 
them it worked. I also changed from 0 and 1 to true and false which is what 
<s:property value="active"/> gives as output.

Example: 
<s:radio list="#{true:'Active', false:'Not active'}" label="Status" 
value="%{active}" name="active" />

Hope this helps you :)

ALM


-----Opprinnelig melding-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av yitzle
Sendt: 23. juli 2007 17:04
Til: Struts Users Mailing List
Emne: Re: Radio Button - setting a <s:radio ... /> to 'checked'

On 7/23/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I also experience this problem with the radio button.
> Could you please give me an example of how this is done?
>
> My code:
>
> <s:radio list="#{'0':'Not active, '1':'Active'}" label="Status"
> value="%{cv.active}" name="cv.active" />
>
> <s:property value="cv.active"/> gives a 'true' output.
>
> If I change from radio to select it works ok, strange...
>
> Thanks in advance for your help :)
>
> ALM

I still did not manage to figure out how to set the radio buttons. I
tried hardcoding the list and value in the JSP with no success.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to