Hi everyone, I have an html:checkbox in logic:iterate and I would like to know what row the user checked after I submit the form.
My Form has an ArrayList of Objects. My action reads the arraylist and check to see witch item is selected. My jsp is: <logic:iterate id="fruits" name="FRUITS" scope="session" property="fruits" type="ch.thales.model.Fruit"> <tr> <td><html:checkbox name="fruits" indexed="true" property="isChecked"/></td> <td><bean:write name="fruits" property="fruitName"/></td> </tr> </logic:iterate> My Action is : if(session != null) { System.out.println(" The following fruits are selected:\n"); System.out.println("serviceForm.getSelectedItems().length ==== "+serviceForm.getSelectedItems().length); for(int i=0;i<ar.size();i++) { if(((Fruit)ar.get(i)).getIsChecked() == true) { System.out.println(((Fruit)ar.get(i)).getFruitName()); } } } else { return (mapping.findForward("failure")); } return (mapping.findForward("success")); } Please let me know. Toni. _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>