From: "Adedokun, Bisi" <[EMAIL PROTECTED]>
> I have a result page that is populated from the database. I used the
> <logic:iterator> to iterate through the transfer object to get results
> matching a search criteria. However, I want the ability to do a multiple
> delete by using a checkbox to check those records that needed to be
deleted.
> I used the "indexed" attribute as follows hoping to identify the row where
> the checkbox is checked, but could not retrieve those values in my Action
> class. My ActionForm class has only one property for "checkDelete" which
is
> of type boolean. Do I need to have extra attributes that return a List
that
> represent the rows checked? Please help.

I use 'multibox' (not checkbox) and a String[] property in the Form bean.

struts-config.xml:
<form-bean
            name="accountForm"
            type="edu.asu.vpia.struts.AccountForm">
            <form-property     name="accounts"
type="java.lang.String[]"/>
       </form-bean>

JSP:
<c:forEach items="${accountForm.map['accounts']}" var="acct" >
   <html-el:multibox property="accounts" value="${acct}"/>
   <c:out value="${acct}"/>
   <c:out value="${accountMap[acct].costCenterDesc}"/>
</c:forEach>

Adjust as necessary if you want to use the "original" Struts tags and a
non-dynamic Form.

-- 
Wendy Smoak


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to