• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

add a row

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am retreiving data from the database into a jsp page using struts and hibernate. I want to edit the data on clicking an edit button. How do i create a new row of the retreived record along with the data for editing ?
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

deepa karra wrote:I am retreiving data from the database into a jsp page using struts and hibernate. I want to edit the data on clicking an edit button. How do i create a new row of the retreived record along with the data for editing ?




Make all the html elements read only in jsp initially, when you click on edit button just make them editable. Make sure you are using saveOrupdate method while persistence data at session.
 
deepa karra
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankyou. I donot want to edit in the same row. When i click edit button, i want to create a new row along with the data below the original record and then edit in the newly created row.
 
Bhagat Singh Rawat
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

deepa karra wrote:Thankyou. I donot want to edit in the same row. When i click edit button, i want to create a new row along with the data below the original record and then edit in the newly created row.




Then you should learn HTML "how to add new elements dynamically on HTML"?
 
deepa karra
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankyou. I could add a row dynamically using struts.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear deepa karra , I'm having the same problem and still I couldn't edit the record. Can you help me? please..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic