<% String css="";int i=0; %>
  <logic:present name="rleRight">
  <logic:iterate id="rle" name="rleRight">
  <% if(i%2==1) css="rc"; else css="rw"; i++; %>
  <tr class="<%=css%>"> 
    <td><input id="AUTH_A0" name="rleChk" type="CHECKBOX" value="<bean:write name='rle' property='id'/>" /></td>
    <td>
 <%if(UserPermission.hasPersission(request,UserPermission.Rle_menu,"M")){%> 
<a href="javascript:update('<bean:write name="rle" property="id"/>','<bean:write name="rle" property="name"/>')"><bean:write name="rle" property="id"/></a>
<%}else{%>
     <bean:write name="rle" property="id"/>
<%}%>
</td>
    <td align="left"><bean:write name="rle" property="name"/></td>
    </tr>
  </logic:iterate>
  </logic:present>

解决方案 »

  1.   

    你可以使用multibox,<html:multibox property="checkbox" value="XXX">,value中的值一般是显示的内容在数据库中对应的id值。
    property的值对应action form中的一个属性名,有自己的get和set方法,该属性的类型好像是一个string数组,详细用法见《struts in action》。实现删除的action类,可以从该action form中取得所选择的一组checkbox所对应的一组值,进而可以执行删除操作。
      

  2.   

    我的jsp中包含如下代码 
      <tabble>   
        <logic:iterate id="book" name="books" type="tmsbooks.Book">
          <tr align="left">
            <td>
              <input type="checkbox" name"chkbox" value="2">
            </td>
            <td>
              <bean:write name="book" property="book_no" />
            </td>
          </tr>
         </logic:iterate>
       </table>
       <a href="Delete.do?chk_box=chkbox">Delete</a>
    在jsp对应的action文件中用
      String[] chkboxs=request.getParameterValues("chkbox");
      取chkbox的值是null.
    问:jsp中必须有form和submit才能在action中得到chkbox的值吗?用链接action直接能处理吗?