struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paranoid_Fabio <>
Subject Re: Radio button with two boolean choices
Date Thu, 28 Feb 2008 17:39:52 GMT

Thank you very much. It works now. I tried it before, but instead of what you
suggested me I was trying with:

<s:radio list="#{1:'True', 0:'False'}" name="c_sub"/>    and it didn't work.

Now it's ok. Only a question... your advice works but the jsp editor says
me: Syntax Error in EL. Do you know why?

 <s:radio list="#{true:'True', false:'False'}" name="c_sub"/>   	

(the part in Bold is what the editor highlight as syntax error...)

Thank you

Paranoid_Fabio wrote:
> Hello. I know it's really simple but I cannot make it works.
> What I want to do is to put a radio button with two options, in a form.
> The attribute that will be set by selecting one of the two options is a
> boolean. That's it, simpy a true/false choice.
> 1) Is it possible to declare a static list directly in the JSP without the
> callback to the action to get a Map with such boolean values?
> 2)If it is not possible, how can I do that. I tried to put a
> Map<String,Boolean> called options in my Action 
> and put that in the jsp:
> <s:radio id="subChoice"  labelposition="top" key="ManualUploadForm.6"
> name="c_sub"  list="options"></s:radio> 
> where c_sub is a the boolean variable I want to set by choosing an option.
> It does not work. 
> In the log I get:
> tag 'radio', field 'list', id 'subChoice', name 'c_sub': The requested
> list key 'options' could not be resolved as a
> collection/array/map/enumeration/iterator type. Example: people or
> people.{name} - [unknown location]
> Please help. Thano you very much.

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message