Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Array troubles...  RSS feed

 
Dave Purnell
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm creating a JSP which contains a variable number of rows in a table on the resulting webpage. Each of these rows is being created from an array from a class containing various client information. Some of this info is put into text boxes on the form which will allow the user to update the values.
This is where I'm stuck. How do I now get the values from this variable number of text boxes back into the array in the client class once the user clicks the submit button?
In other pages I'm letting the JSP automatically update the values in the class fields by naming the input fields on my webpage the same as in the class, which works fine in my other pages where I have a fixed amount of input data, but I'm not sure if I can do this with a variably constructed number of text input boxes.
I'm probably not being very clear, but any help or suggestions would be greatly appreciated!
thanks,
Dave
 
Bosun Bello
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can give the textboxes the same name, then use getParameterValues() to get the values. It returns an array.
[ August 30, 2002: Message edited by: Bosun Bello ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!