• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Array troubles...

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Let nothing stop you! Not even this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic