Another option is to provide a radio button for each row and then only one Edit and 
one Delete button is required.

Sri

-----Original Message-----
From: Ian Hunter [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 9:40 AM
To: Struts Users Mailing List
Subject: Re: <html:form> WITHIN a <logic:iterate> tag


I was having formatting problems with the <form> tag (that I was able to get around 
with CSS style="margin-bottom: 0px;"), and I was under the impression that having 
multiple forms on one page with the same name would make it ambiguous as to which form 
was being submitted, but it seems to be working.

Becky -- good suggestion re: anchor tag, I was just trying to figure out the best way 
to handle that and still use a button.  Never mind, though...

----- Original Message -----
From: "Geeta Ramani" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 27, 2003 9:14 AM
Subject: Re: <html:form> WITHIN a <logic:iterate> tag


> 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]
>


---------------------------------------------------------------------
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]

Reply via email to