Hi,
I have form:checkboxes that the data came from referenceData.
I can retrieve the data but when I select one of the checkboxes and click submit, the form doesn't go to "protected ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response, Object command,BindException errors)" method
But when I didn't select any of the checkboxes it goes to "onSubmit" method but having nullpointerexception
Here's my jsp
My bean configCode:<form:form commandName=""test_command" method="post" action="custom.htm" id="bookID"> <table class="Style3"> <tr> <td>Delete</td> </tr> <tr> <td> <form:checkboxes path="deletedBooks" items="${books}" cssClass="note" element="checkbox" delimiter="<br/>" /> </td> </tr> <tr> <td><input type="submit" name="submit" title="Delete Selected"/></td> </tr> </table> </form:form>
my BookDaoCode:<bean id="bookCustom" class="com.test.BookController"> <property name="formView" value="custom"/> <property name="commandName" value="test_command"/> <property name="successView" value="custom"/> <property name="commandClass" value="com.test.BookDao"/> </bean>
Can someone point me what did I do wrong with my checkboxes?Code:private Map<String,String> deletedBooks; //get and setters
Thanks,


Reply With Quote