wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic text box value into database
 
Similar Threads
javascript error: object expected
How to retrieve the values of dynamically created text boxes in jsp
Element Shift Problem in Dynamic Form
Problem in hiding the row of data
Passing row id from html table on jsp to Action Class in Struts