> -----Original Message----- > From: andy wix [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 31, 2004 9:19 AM > To: [EMAIL PROTECTED] > Subject: Re: Identifying the 'clicked' line when iterating over > collection > > > Hi, > > I have tried most of the code in the replies and, alas, fear > my brain is too > small to get any working. > I am persevering with Rick Reumann's method (because I liked > the Struttin' > with Struts stuff!) but I don't get a session parameter in my > next page > after the link is followed (I have changed the scope to > session). To get > the ID would be something, but it would save me needing an > action class at > all if I could get the contact object representing the > 'clicked' row into > the session or request scope. > A cut down version of the code is: > > <form name="form0" method="post"> > <TABLE border="0"> > <% > ArrayList list = (ArrayList)session.getAttribute("Contacts"); > Iterator it = list.iterator(); > int id = 0; > while(it.hasNext()) { > Contact tempContact = (Contact)it.next(); > }%> > <TR> > <TD><%=tempContact.getName()%></TD> > <TD><%=tempContact.getNumber()%></TD> > > <TD><c:url var="url" scope="session" > value="/do/modifyContact"> > <c:param name="ID" > value="${form0.tempContact.id}"/></c:url> > <a href="<c:out value='${url}'/>">Modify</a> > > Note that I am not using any Struts Forms for this Action as > I receive the > ArrayList from the session. I added an html form tag as > above because you > had one in the example code.
What session attribute are you thinking should be there when you click on Modify? What you'll end up with is a url with params, the params of which won't be in session scope at all. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]