I have a question on how to implement a checkbox using Struts html:checkbox tag. The scenario is as follows:
I have a result page that is populated from the database. I used the <logic:iterator> to iterate through the transfer object to get results matching a search criteria. However, I want the ability to do a multiple delete by using a checkbox to check those records that needed to be deleted. I used the "indexed" attribute as follows hoping to identify the row where the checkbox is checked, but could not retrieve those values in my Action class. My ActionForm class has only one property for "checkDelete" which is of type boolean. Do I need to have extra attributes that return a List that represent the rows checked? Please help. Below is my JSP code: <logic:iterate id="register" name="searchResults" type="org.acaosa.registration.RegistrationTO"> <tr> <td width="5%"><html:checkbox name="deleteForm" property="checkDelete" value="true" indexed="true"></html:checkbox></td> <html:hidden property="memberId" name="registration"/> <td width="20%"><bean:write name="register" property="firstName" /></td> <td width="20%"><bean:write name="register" property="lastName" /></td> <td width="20%" align="center"><bean:write name="register" property="phone" /></td> <td width="25%"><bean:write name="register" property="email" /></td> <td width="10%" align="center"><bean:write name="register" property="region" /></td> </tr> </logic:iterate> Any suggestions will be appreciated. Let me know if you need additional info. Thanks Bisi ======================================================================== This email message is for the sole use of the intended recipient (s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. To reply to our email administrator directly, send an email to [EMAIL PROTECTED] Toys "R" Us, Inc. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]