Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

insert values into database from dynamically added rows  RSS feed

 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on jsp page i have created table with dynamically added rows now i want to insert the data from dynamic row field into database.
how would i get the ids of those dynamically created rows to insert into database using hibernate
 
Ivan Krasic
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Megha Singhal wrote:on jsp page i have created table with dynamically added rows now i want to insert the data from dynamic row field into database.
how would i get the ids of those dynamically created rows to insert into database using hibernate


can you provide code so i cant imagine what are you trying to achieve
 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using the following code i am dynamically adding rows


now i want to insert this dynamic added field data into the database using hibernate.
so i want to know how can i do that.
 
Praful Thakare
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the issue here? are you asking for code to insert data in table? I think no one can provide that.
If you asking for how to get there then do the following.

I assume lazyRowAdd.web maps to some server side method in action/class/servlet so you need to read values from request/form in this method and construct your model (hibernate object) and pass to data layer to save it.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!