wood burning stoves 2.0*
The moose likes JSP and the fly likes Multiple record updation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Multiple record updation" Watch "Multiple record updation" New topic
Author

Multiple record updation

Venkata Sirish
Ranch Hand

Joined: Apr 09, 2007
Posts: 112
Hi,
In jsp iam displaying, 100 records . Iam displaying a check box for each record. It is a delete functionality. I will check the corresponding records checkbox which are to be deleted.

How can i handle this functionality... how can i get the list of users who have been checked to be deleted, in the backend (Java Action class).

Please explain me in detail .... ASAP

Thanks in Advance,
Guru
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"VenkataGuru Mitta",
Please check your private messages.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Schandha Ravi
Ranch Hand

Joined: Oct 20, 2007
Posts: 167
Hi Venkata,

You can always get the value of your checkbox in your controller using req.getParameter(<param name>) if this function returns "On" that means that checkbox is selected. Check www.w3schools.com for further information on these controls.


Thanks & Regards, SK
SCJP 5.0, DB2 - 800, DB2 - 803, SCDJWS (On the way)
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Well, when you want to get checkboxes, since there can be more than 1 checked, you need to be able to get back an array of those values. So you'd need something like:

String[] users = request.getParameterValues('whateverNameYouGaveTheHTMLElements');

That being said, I also noticed you mentioned "java Action class" and when I see folks say Action I think a framework might be involved. If this is true, while my suggestion above is still valid, there may be a different/easier/harder way to do it using the framework. You'll just need to let us know.


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple record updation
 
Similar Threads
updateRecord: can it include undelete?
nx: (htl) Displaying deleted records
NX: URLyBird questions about database
automatic refresh of a jsp page
executeUpdate() not inserting record