Ian,
An alternative approach that I used was to use a link rather than a
form:
<logic:iterate id="project"
name="user"
scope="session"
property="projects">
<li>
<a href='recursor-action.action?pid=new&id=<bean:write
name="project" property="id"/>'>
<bean:write name="project" property="subject" />
</a>
</logic:iterate>
That worked well for me. The above is a simple example, I did the same
for an EDIT/DELETE like you want to do, but it's more complex, so I
didn't post it.
--
Becky Norum
Database Administrator
Center for Subsurface Sensing and Imaging Systems (CenSSIS)
Northeastern University
http://www.censsis.neu.edu
On Thu, 2003-02-27 at 08:46, Ian Hunter wrote:
> I looked through the archive before posting this, but there was just so much
> stuff in there about forms and select that my eyes glazed over and I gave
> up.
>
> What I want to do is have a series of items from a database appear on a
> page, in a table, each one to a row. At the end of the row, in one column,
> I want to have edit and delete buttons that refer to the specific item by
> primary key. I can do this in other scripting languages by doing stuff like
>
> <% for variable = 1 to whatever %>
> <form name="editItem<%=variable.loopcounter%>" action="editpage"><input
> type="submit" value="Edit"></form>
> <% next/loop/end/whatever pick your scripting language %>
>
> but with struts/JSP if I say
>
> <logic:iterate id="bulletin" type="BulletinForm" name="bulletinVector">
> <tr>
> <td class="bulletindate"><jsp:getProperty name="bulletin"
> property="datePosted"/></td>
> <td><jsp:getProperty name="bulletin" property="message"/></td>
> <td valign="center" align="right">
> <html:form name="editBulletinForm<%=bulletin.getId()%>"
> action="editbulletin" type="BulletinForm">
> <html:hidden property="id" value="<%=bulletin.getId()%>"/>
> <html:submit value="Edit"/>
> </html:form>
> <html:form name="deleteBulletinForm<%=bulletin.getId()%>"
> action="deletebulletin" type="BulletinForm">
> <html:hidden property="id" value="<%=bulletin.getId()%>"/>
> <html:submit value="Delete"/>
> </html:form>
> </td>
> </tr>
> <tr><td colspan="3"><hr width="100%"/></td></tr>
> </logic:iterate>
>
> That doesn't fly because <%=bulletin.getIds()%> doesn't get expanded within
> the <html:form> tag.
>
> SURELY someone has done this with struts. Help?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]