• Post Reply Bookmark Topic Watch Topic
  • New Topic

processing Checkboxes in MVC

 
Bhaarat Sharma
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello i am new to JSP's

I have a page where there will be unknown (dynamic) number of checkboxes. user can select some of these and click delete button. upon clicking the delete button a back end java class is called and after all the deletion is done the control comes back to the page we were at. my question is: how, in my java code, can i get which checkboxes were selected!? is there a way i can somehow get all the checkboxes that were selected as a Collection in my java code?

I'd really really appreciate any help.

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If they all have the same name using request.getParameterValues("name") will return an array of all of the checked box's values.
 
Bhaarat Sharma
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeaa that will work thats a lot!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!