This is the problem I am trying to solve.
I want to submit a DynaValidatorForm with multiple hidden/text inputs that
have the same name. This is a list of items and quantities that I am trying
to update with one submit (e.g. itemId, quantity). Is this what the
'indexed' input attribute is supposed to help with? Will the validator
understand how to apply the rule for itemId to every indexed instance of
itemId? Will DynaValidatorForm receive an array of itemIds and quantities?

Since the items are stored in a collection, I want to iterate over them,
outputting the input fields. With c:forEach, I get an exception that the
indexed attribute is not supported. With logic-el:iterate, I get a name
attribute that looks like
name="org.apache.struts.taglib.html.BEAN[1].itemId" - that doesn't look
right at all.

I am using Struts 1.1rel (and the struts-el JAR in the contrib dir) with
JSTL 1.0 in Resin 2.x.x. 
Has anyone seen behavior like this and know how I can fix it? 
Or am I barking up the wrong tree trying to submit my form in this fashion?

Here's a bit of the JSP code...
<%--c:forEach var="item" items="${context_tray.items}" varStatus="idx"--%>
<logic-el:iterate id="item" name="context_tray" property="items"
indexId="idx">
        <html-el:hidden property="itemId" value="${item.id}"
indexed="true"/>
        <html-el:text property="quantity"
value="${context_tray.itemQuantityMap[item]}" size="2" indexed="true"/>
        <br>
</logic-el:iterate>
<%--/c:forEach--%>

thx

Andy Kriger | Software Mechanic | Greater Than One, Inc.
28 West 27th Street | 7th Floor | New York, NY 10001
P: 212.252.7197 | F: 212.252.7364 | E: [EMAIL PROTECTED] 

Reply via email to