This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes dynamic text box value into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "dynamic text box value into database" Watch "dynamic text box value into database" New topic
Author

dynamic text box value into database

kalyen kumar
Ranch Hand

Joined: Sep 18, 2008
Posts: 53
Hi,

I am using struts framework.
I have transaction table whose data i will be displaying on a JSP in tabular format based on given date.
The number of transaction records displayed may vary but i want to add a text box for each record displayed.
The user will give some price input in these text boxes and submit.

I want to insert the text boxes values into a price table.

JSP1


Please observe the id attribute of text input tag.
The values for buyer and transactionid are diplayed in the jsp1.
What should be given in text id in order to read all the text boxes values in my action class???

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The ID isn't relevant; it's the name you need to fill in.
kalyen kumar
Ranch Hand

Joined: Sep 18, 2008
Posts: 53
ok thanks....but then what should be name..?



What should be given in textbox name in order to read all the text boxes values in my action class???
Thanks in advance
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

A name and an index, so it looks like array notation. Or it could be a map with an ID. Might also depend on which version of Struts you're using, which you don't mention.
 
 
subject: dynamic text box value into database
 
Similar Threads
Problem in hiding the row of data
Element Shift Problem in Dynamic Form
javascript error: object expected
How to retrieve the values of dynamically created text boxes in jsp
Passing row id from html table on jsp to Action Class in Struts