Passing row index from .jsp to Action Class in Struts

M

Mongoose

Hi All,

I have a table created on my .jsp and I'm trying to pass the id of the
row of the table to my execute method of my Action Class in Struts.
When I try to pass the id with the <html:hidden> tag with the
following code I always get the first ID value. Can someone explain
to me how to do this?

Thanks!

A


<c:forEach items="${Defects}" var="myCollection"
varStatus="loopStatus">

<html:hidden property="defectid" value="$
{myCollection.defectid}"/>

<td><c:eek:ut value="${myCollection.defectid}"/></td>
<td><c:eek:ut value="${myCollection.description}"/></td>
<td><c:eek:ut value="${myCollection.priorityid}"/><br></td>
<td><c:eek:ut value="${myCollection.reportdatetime}"/><br></td>

<td><c:eek:ut value="${myCollection.reporteruserid}"/></td>
<td><c:eek:ut value="${myCollection.functionalareaid}"/><br></
td>
<td><c:eek:ut value="${myCollection.statusid}"/><br></td>

<td><html:submit property="actionButton" value="Update"
styleClass="submit" /></td>
<td><html:submit property="actionButton" value="Delete"
styleClass="submit" onclick="return
confirmDelete();"/></td>

</tr>
</c:forEach>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top