• 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

form values accessed in Action code

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written a form that will be displayed to the user and it will show them between 0 and 20 textfields. All of them are editable. The issue that I am not sure how to solve is how would I go about getting the 0-20 variables out in the Action code. That is to say how would one go about pulling them back without the extremely ugly manner of pulling back each value on it's own.

A concrete example:
List of products on the screen.
User is able to modify quantity field on screen. After clicking submit I want to be able to pull back all 0-20 values so that I can update the values in the backend appropriately.



Any suggestions or thoughts would be greatly appreciated.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two words...indexed properties. Search this forum or the Internet and you are bound to find some information (there is a good page in the Struts FAQ on the apache site). Indexed properties can be a bit tricky, so come back if you have some specific questions.

- Brent
 
A knibbs
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great thanks for the starting point, I was running out of search phrases that made any sense.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic