File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes form values accessed in Action code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "form values accessed in Action code" Watch "form values accessed in Action code" New topic
Author

form values accessed in Action code

A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
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.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
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

Joined: Aug 23, 2006
Posts: 158
Great thanks for the starting point, I was running out of search phrases that made any sense.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: form values accessed in Action code