File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes providing edit, delete options to a table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "providing edit, delete options to a table" Watch "providing edit, delete options to a table" New topic
Author

providing edit, delete options to a table

shanti jarnala
Greenhorn

Joined: Feb 20, 2006
Posts: 3
Hi,
I am implementing an application which displays the rows of oracle table in a jsp page by connecting to database using JDBC. I am done with it and now I need to provide edit and delete options to each and every row of my table in jsp. So I got an idea of providing with edit, delete buttons for each and every row. but if the table is too big this method is not good. another idea is to provide all the rows with check boxes so that user can check those boxes and then he can use edit or delete buttons (which are declared globally for the table...not for each row).
I need help in this..If you have any idea please share.
Thanks,
Shanti.
Jherald Lacambra
Ranch Hand

Joined: Feb 02, 2005
Posts: 129
maybe its better if you will display a portion of a table first and a checkbox to the coresponding row. the checkbox will be the que on which rows will be deleted/edited in the database in


jherald
shanti jarnala
Greenhorn

Joined: Feb 20, 2006
Posts: 3
Thanks for the fast reply.
Do you have any idea of how to add check box functionality to my existing table. and moreover if I select one row and click edit...how can I get only those row values into the next page?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

"shanti jr",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jherald Lacambra
Ranch Hand

Joined: Feb 02, 2005
Posts: 129
first change your name here(JAVARANCH Forum as it is required) then on your checkboxes, put a value of the unique column from your database when you populate your database. when you click either the edit or delete button it should query or delete the said row.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by shanti jr:
Thanks for the fast reply.
Do you have any idea of how to add check box functionality to my existing table. and moreover if I select one row and click edit...how can I get only those row values into the next page?


- insert one more column to your table for checkboxes
- map each checkbox to record id
- get the checkbox value at the server. If unchecked you would get null, otherwise record id
- do whatever you want to do with that particular record. You can open up that record in edit mode in the next page or you can just delete that record and display the same page again.

Cheers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: providing edit, delete options to a table
 
Similar Threads
disabling and enabling text boxes
selecting a row from table using radio buttons
Struts and dynamic table rows and editing?
Capturing selected check boxes
JSP- finding the table row selected