• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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: 1512
  • 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 ]
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic