Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

retrieving data from table and saving into database

 
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.




 
Sheriff
Posts: 21999
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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


 
Bartender
Posts: 1104
10
Netbeans IDE Java 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?
 
no wonder he is so sad, he hasn't seen this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic