File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring MVC onSubmit not called

 
Jehan Jaleel
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
The following is a really wierd problem. I am using Spring MVC. I have a form with a bunch of checkboxes like follows....



What happens is that when one checkbox is checked then it works fine. But if more than one is checked then for some reason the onSubmit method of my Controller which extends SimpleFormController is not called.

The form submits but it does not call the onSubmit method.

Any idea why this could be happening?
[ December 09, 2008: Message edited by: Jehan Jaleel ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's your command object look like? Does it have method like "setDeleteFlag(String[] deleteFlag)"?

Check the documentation on the Spring Form Tag Library they have a form:checkbox tag that lets you map the checkbox to specific fields of your command object if you need to.
 
Jehan Jaleel
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nate, this was the problem.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic