可以做一个HIDDEN,在DELETE时,将该行参数给HIDDEN.
因为HIDDEN在FORMBEAN里可以取得,所以在DO里也可以取出来操作

解决方案 »

  1.   

    谢谢DOGMO2USE(fefe) 对我的建议:
    我用hidden这个标签试了试,可是参数总是传递不过去,这个是我刚才做的:
    <html:form action="/member_deleteAction.do" method="post"  >
        <table border="1">
            <logic:present name="list">
                <logic:iterate id="list" name="list">
                    <tr>
                        <td>
                            <bean:write name="list"/>
                            <html:hidden name="member_viewForm" property="username" value="<bean:write name='list'>"/>
                        </td>
                        <td>
                            <html:submit value="delete">                        </html:submit>
                        </td>
                    </tr>
                </logic:iterate>
            </logic:present>
        </table>
    </html:form>
    还是不行啊!!!!!急啊!!!!!这样子做应该没有错吧
      

  2.   

    希望能对你有帮助
     <html:form action="/Depart/trash.do">
        <table width="790" align="center" cellspacing="1" border="0">
          <logic:present name="departmentForm" scope="request">
            <tr>
              <td width="5%">          </td>
              <td width="19%">
                <b><bean:message key="system.dept.id" bundle="cn"/></b>
              </td>
              <td width="76%">
                <bean:write name="departmentForm" property="departmentcode" scope="request"/>
              </td>
            </tr>
            <tr>
              <td width="5%">          </td>
              <td width="19%">
                <b><bean:message key="system.dept.name" bundle="cn"/></b>
              </td>
              <td width="76%">
                <bean:write name="departmentForm" property="departmentname" scope="request"/>
              </td>
            </tr>
            <tr>
              <td width="5%">          </td>
              <td width="19%">
                <b><bean:message key="system.dept.description" bundle="cn"/></b>
              </td>
              <td width="76%">
                <bean:write name="departmentForm" property="description" scope="request"/>
              </td>
            </tr>
          </logic:present>
          <tr>
            <td height="14" colspan="3">&nbsp;        </td>
          </tr>
          <tr>
            <td width="61">&nbsp;</td>
            <td>
              <html:link href="/ccep/Depart/trash.do" paramId="departmentcode" paramName="departmentForm" paramProperty="departmentcode">
                <html:img page="/img/button/delete.gif" border="0"/>
              </html:link>
            </td>
            <td>
              <html:link page="/Depart/list.do">
                <html:img src="/ccep/img/button/cancel.gif" border="0"/>
              </html:link>
            </td>
          </tr>
        </table>
      </html:form>
      

  3.   

    如果是用我的办法的话,那么是在DEL上做一个ONCLICK的JS方法在JS方法里用这种办法
    document.all.code.value = value;(其中CODE为HIDDEN控件的ID名.等号后面的VALUE为参数)而且HIDDEN不用象你这样
    在JSP里,只要做一个就可以了,只要点击了DEL的ONCLICK,就将值送出这一个HIDDEN
      

  4.   

    那个参数传递的问题已经解决了,是用那个<bean:hidden>标签,不过现在又出现了另一个问题,就是我把在数据库里面得结果集放在一个actionform里面,把得到的用户名这n条记录集放在一个AyyayList里面,这个是我的源代码:
    <html:form action="/member_deleteAction.do" method="post">
        <table border="1">
            <logic:present name="list">
                <logic:iterate id="list" name="list" scope="session">
                    <tr>
                        <td>
                            <bean:write name="list"/>
                            <html:text name="member_viewForm" property="username"/>
                            <html:hidden name="member_viewForm" property="username" value="username"/>
                        </td>
                        <td>
                            <html:submit value="delete"></html:submit>
                        </td>
                    </tr>
                </logic:iterate>
            </logic:present>
    从那个actionform里面只能取出一个相同字段的值,放在那个text文本里面,这个是为什么呢?
      

  5.   

    因为你在hidden里指定了value,所以会出这种问题
    把value这项删掉就行了
      

  6.   

    用html:hidden吧,用bean:write只能显示,不能传递值的