This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes How to submit a collection of form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to submit a collection of form" Watch "How to submit a collection of form" New topic
Author

How to submit a collection of form

Solo Chiang
Greenhorn

Joined: Sep 14, 2005
Posts: 18
I am wondering if there is a way to submit a collection of Struts form?

I am using
<logic:iterate name="itemList" id="item" indexId="iterateID">
<bean:write name="item" property="name"/>
<html:text name="item" property="purchaseQuantity"/>
.......
to display a list of items in the web page with input field for use to choose and put into the shopping cart.

I would like to intercept what users have enter for each item in the action class.

Would someone please tell me how?
Thanks a lot!
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I have one word for you...okay, actually two words..."indexed properties". There are lots of threads hear on the topic. Two good links on the topic are:

http://struts.apache.org/1.2.9/faqs/indexedprops.html
http://wiki.apache.org/struts/StrutsCatalogLazyList

- Brent
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to submit a collection of form
 
Similar Threads
How to get results from indexed fields????
nested beans - setting values in form
Database driven dynamic radion buttons
Help regarding logic:iterate tag
Handling Multiple check boxes