日期:2014-05-17  浏览次数:20646 次

form+table提交大数据量的问题?不惜赐教!
<form action="modify.action" method="post">
  <table border="1" align="center" bordercolor="gray" style="border-collapse: collapse; border: 1px solid blue;">
  <tr>
<td align="center">Xpath</td>
<td align="center">节点名</td>
<td align="center">节点值</td>
<td align="center">属 性</td>
<td align="center">属性值</td>
  </tr>
  <s:iterator id="items" value="#request.listinfo" status="stau">
  <tr id="">
  <td align="center">${items.xpath} <input type="hidden" id="xpath${stau.index}" name="xpath${stau.index}" value="${items.xpath}"/> </td>
<td align="center">${items.nodeName}</td>
<td align="center">
<s:if test="#items.nodeValue !=null&&#items.nodeValue !=''">
<input type="text" name="nodeValue${stau.index}" id="nodeValue${stau.index}" style="text-align: center;"class="input_out" onfocus="this.className='input_on';this.onmouseout=''" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onmousemove="this.className='input_move'" onmouseout="this.className='input_out'" value="${items.nodeValue}"/>
</s:if>
</td>
<td align="center">${items.nodeAttr}</td>
<td align="center">
<s:if test="#items.nodeAttrValue !=null && #items.nodeAttrValue !=''">
<input type="text" name="nodeAttrVal${stau.index}" id="nodeAttrVal${stau.index}" style="text-align: center;" class="input_out" onfocus="this.className='input_on';this.onmouseout=''" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onmousemove="this.className='input_move'" onmouseout="this.className='input_out'" value="${items.nodeAttrValue}"/>
</s:if>
</td>
  </tr>
  </s:iterator>
  <tr>
  <td colspan="5">
  <input type="submit" style=" margin-left: 250px;" value="修改" align="middle"/>
  <input type="button" style=" margin-left: 100px;" value="取消" align="middle"/>
  </td>
  </tr>
  </table>
  </form>

------解决方案--------------------
ajax分步提交。
------解决方案--------------------
用ajax以xml的格式提交,服务器端解析xml,根据业务逻辑进行处理
------解决方案--------------------
如果用AJAX,以你目前什么都不了解的情况,恐怕费劲。用原始的POST就可以了。

估计一下你可能面对的数据处理量。一般的情况,正常的POST就可以了。如果数据多,你可以拆分成几部分,逐部分地返回前台供修改提交和保存,这一部分完了处理下一部分。

------解决方案--------------------
<table>
<tr><td>
<input type='text' name='inp_${list[id]}' value='$(list[name]'/>
</td></tr>
<tr><td>
<input type='text' name='inp_${list[id]}' value='$(list