• Post Reply Bookmark Topic Watch Topic
  • New Topic

A JSP table issue  RSS feed

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a table that's being created dynamically from the database (using "<c:forEeach>").

Downside the table i have a delete button.

And each row in the HTML table has a radio button or a check box.

I want to know how can i know which row(s) was/were selected when pressing delete and meanwhile how to send the number(s) to a JSP so i can delete them from the databasae ?

Thanks in advance ...
[ March 10, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can associate a unique key with each radio button that identifies the corresponding record.
 
Syed Saifuddin
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Set the value of the radiobutton/checkbox as rowID. and in the servlet use request.getParameterValues("radiobuttonname/checkboxname");

by this you will get the selected key as an array of string.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!