This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes duplicate row for editing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "duplicate row for editing " Watch "duplicate row for editing " New topic
Author

duplicate row for editing

deepa karra
Ranch Hand

Joined: Apr 04, 2008
Posts: 46
Hi,
I am retreving a row from a table using struts and hibernate and displaying it on a jsp page. How can I create a duplicate row of the displayed record on a button click for editing in the same jsp page?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63208
    
  69

Reacting to a button click to do anything other than submit a form requires JavaScript. Perhaps you can supply a more detailed description of what you are trying to accomplish.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nilesh Miskin
Ranch Hand

Joined: Jun 17, 2010
Posts: 44
As Bear rightly said, you need JavaScript to get your job done. When you click the button, javascript can be used to populate the values in proper html elements (e.g. a text input). Here you can modify the record & submit the form to update the table in your database as per the business logic.


Nilesh Miskin
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: duplicate row for editing
 
jQuery in Action, 3rd edition