<s:checkboxlist label="List" list="${YourPredefinedList}" name="CommonName(is only one name)"/> or <s:iterator value="manyNames" status="cnt"> <s:checkbox name="CommonName(is only one name)" fieldValue="[${cnt}]"> </s:checkbox> </s:iterator>
Any of this should solve your problem. first one will iterate for itself second we are doing that. But still all checkbox shouldhave same name. You bean of will surely get list of values(not true). ----- Original Message ---- From: Andreja <[EMAIL PROTECTED]> To: Struts Users Mailing List <user@struts.apache.org> Sent: Wednesday, 4 July, 2007 1:24:25 PM Subject: Re: Checkboxes problem Sharad, thank you for the answer. Keeping in mind what you said, I tried to make it work like this: <s:iterator value="manyNames" status="cnt"> <s:checkbox name="manyNames" > <s:property value="[${cnt}]"/> </s:checkbox> </s:iterator> This populates the checkboxes, but when I submit the data, all I can get is ArrayList of true booleans: [true, true...], and I can not use that. I need something like: [x]Tom [ ]Dick [x]Harry And after submit, the list should be: [Tom, Harry]. The problem is that I can not make checkbox return String value instead of boolean. There must be a way to do so, because s:checkboxlist can return ArrayList<String>, but I don't know how to do so by using s:checkbox. Regards, Andreja --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php