File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Pre-populating a struts form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pre-populating a struts form " Watch "Pre-populating a struts form " New topic
Author

Pre-populating a struts form

N Nanda
Ranch Hand

Joined: Feb 09, 2004
Posts: 62
Hi to all... Kindly someone help me. I am using the same page to display the records from a database and a form in which i can add records.


Field 1 Field 2 Actions
-----------------------------------------
Value Value View | Edit | Delete
-----------------------------------------
Value Value View | Edit | Delete

.
.
.

Add a new Value...

<here lies my form>


Here View | Edit | Delete are all links. I want when I'll click on the Edit link, the data from that row must appear in the form below. Please Help me how to do it. Its an urgency.

Thanking you all in advance.

Niranjan Nanda
Shankar Narayana
Ranch Hand

Joined: Jan 08, 2003
Posts: 134
Hi Nanda,

what you can do when you click the Edit is (I assume you have entered the some value into some field to retrieve the record from the database) get the corresponding records from the database and populate the actionForm and return back to the jsp, your fields will be filled the values of that specific record.


"Failure is not when you fall down; its only when you fail to get up again."
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pre-populating a struts form