> From: Tom McCobb [mailto:[EMAIL PROTECTED] 
> In another section of the page I display an iterated list of 
> items in a collection. 
> I am stuck on how to get the value of "i", the index of the row
wherein the button was clicked.

Are you willing to use JSTL?  The <c:forEach> tag has 'varStatus' which
will give you the integer position as you loop through the collection.
This won't be exactly right, I haven't worked with it for a while,
but...

<c:forEach items="${myCollection}" var="myItem" varStatus="myLoopIndex">
    <c:out value="${myLoopIndex}"/> 
    <c:out value="${myItem}"/>
</c:forEach>

Are these links, or do you need to submit the form with the index as one
of the form properties?  Do you have any objection to JavaScript?

With Struts-EL and JSTL, I haven't needed to venture into the Nested
taglib, although I understand there are things it can do that
Struts-EL/JSTL cannot.  This may be one of them...

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to