• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

retrieving data from table and saving into database

 
Anita Nair
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

I have used Table and passed it to a TableEditor element.
I have a few text boxes and combo from which the user enters data.
Then there is a editable table using which user is allowed to enter data into table directly.
I want to know how to know how many rows have the user entered data when they click on the save button.
also how to save multiple rows to the db at the same time ie on click of save button. my code doesnt seem to work
There is also a delete and edit button. Please help.
Here is my code.




 
Rob Spoor
Sheriff
Pie
Posts: 20546
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ItDoesntWorkIsUseless. Does the code throw an error? Does it get called at all? What exactly is not working?
 
Anita Nair
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my code is as given below..
now i want to allow users to enter data directly into the table..
on the click of save button i want to know how many rows the user has entered so that i can save it into my database using for loop
now i am doing it by reading a textbox which asks the user for the number of rows they want to enter.
Though this is very inefficient i dont know what else to do? Please help


 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anita, Welcome to the Ranch!

You have to first write your own TableModel from which you can get the number of rows and all the data. My sugeestion would be to start reading the tutorial about tables.

You have posted code of 400 lines with db code which doesn't really help. You should create a SSCCE and post the code.
 
Anita Nair
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks..
another question is that one of my column in the table is a droprdownbox based on the value of which i want to hide /show another column.
how do i do this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic