Ian:
Since you already have the info about the "id" in your hidden varaible "id", why
do you also have to hav eit coded within the name of the form? Iow, why can't
you keep it simple, as in:
<html:form name="editBulletinForm" action="editbulletin" type="BulletinForm">
<html:hidden property="id" name="bulletin" property="id"/>
<html:submit value="Edit"/>
</html:form>
Am I missing something?
Geeta
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]