Hi Greg,
I think what your are looking for is the indexId attribute of the
logic:iterate tag, check the doc at :
http://jakarta.apache.org/struts/struts-logic.html#iterate
it is quite clearly stated.
Here is a case in which I use it to populate my taskForm.index property :
<logic:iterate id="taskForm" indexId="taskFormIndex"
name='<%=TaskAction.TASK_FORM_LIST%>' >
<html:form action="/taskView2">
<tr>
<td>
<html:hidden name="taskForm" property="index">
<bean:write name="taskFormIndex" />
</html:hidden>
<html:hidden name="taskForm" property="id">
<bean:write name="taskForm" property="id"/>
</html:hidden>
<html:submit property="save">
<bean:message key="button.save"/>
</html:submit>
</td>
<td><html:text property="name" size="25" maxlength="50" /></td>
<td><html:text property="projectId" size="4" maxlength="6" /></td>
<td><html:text property="status" size="1" maxlength="1"/></td>
</tr>
<tr>
<td colspan="10"><html:textarea property="description" rows="2"
cols="80" /></td>
</tr>
</html:form>
</logic:iterate>
Patrick
Greg Hess wrote:
>I am iterating threw a collection and I am using a tag library within each
>iteration to build a link for delete and view. The objects themselves have
>no unique identifier and I would like to use the iteration counter to
>identify the object in the collection. Does the page, session have any
>variable to hold the counter that I can use in my tag class.
>
>
>--
>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>