• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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 ]
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic