Jsp 迭代器:-在表单中显示1500条记录。页面正在断开

Jsp 迭代器:-在表单中显示1500条记录。页面正在断开,jsp,struts2,Jsp,Struts2,提前谢谢。 1.我有一张包含豆子的清单。我需要显示用于编辑用户的所有记录。 2.我使用s:iterator进行显示。 问题:- 1.要加载这么多记录,加载页面需要花费很多时间 2.加载jsp页面后,提交页面崩溃 在这种情况下,请帮助设计合适的方法。 业务限制:- 1.用户可以编辑记录 2.将新记录添加/删除到现有列表 3.通过文件上载将批量数据添加到列表 样本代码:- 您必须使用页面导航模式来解决此问题,您可以创建自己的页面导航网格或使用一些现成的第三方struts2插件 比如: 页面为什么会

提前谢谢。 1.我有一张包含豆子的清单。我需要显示用于编辑用户的所有记录。 2.我使用s:iterator进行显示。 问题:- 1.要加载这么多记录,加载页面需要花费很多时间 2.加载jsp页面后,提交页面崩溃

在这种情况下,请帮助设计合适的方法。 业务限制:- 1.用户可以编辑记录 2.将新记录添加/删除到现有列表 3.通过文件上载将批量数据添加到列表

样本代码:-


您必须使用页面导航模式来解决此问题,您可以创建自己的页面导航网格或使用一些现成的第三方struts2插件

比如:

页面为什么会崩溃?错误是什么?下面的Arun建议使用jQuery网格,这可能是一个很好的UI选择,但没有解决服务器上可能存在的问题。为什么不使用Ajax加载带有数据库分页的列表?我在服务器上没有收到任何错误。1.在我的需求中,用户可以选择从LOV或从XL选择laod上传记录。2.我需要获取所选值的详细信息,并将详细信息显示给用户。3.然后用户将编辑详细信息,并一次性单击保存。4.我也写了很多JAVA脚本,在删除脚本后,我能够在功能上继续。但是加载页面的速度非常慢。
     <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].modeOfOper" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].modeOfOper" value="%{modeOfOper}" />

     <s:textfield id="contractChargeDtlsDTOList[%{#stat.index}].billToCustomerId" cssStyle="display:none" theme="simple"
                            name="contractChargeDtlsDTOList[%{#stat.index}].billToCustomerId" value="%{billToCustomerId}"/>

    <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].sizeOfRatesList" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].sizeOfRatesList" value="%{sizeOfRatesList}" />

    <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].proformaCount" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].proformaCount" value="%{proformaCount}" />

     <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].contractDtlSeq" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].contractDtlSeq" value="%{contractDtlSeq}" />

    <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].totalDiscType" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].totalDiscType" value="%{totalDiscType}" />
    <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].totalDiscRate" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].totalDiscRate" value="%{totalDiscRate}" />
   <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].totalAdditionalFreeDays" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].totalAdditionalFreeDays" value="%{totalAdditionalFreeDays}" />

     <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].copyContractRef" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].copyContractRef" value="%{copyContractRef}" />                  
    <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].copyPriceChgId" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].copyPriceChgId" value="%{copyPriceChgId}" />

     <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].relativeContractDtlSeq" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].relativeContractDtlSeq" value="%{relativeContractDtlSeq}" />
     <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].stdTariffChgId" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].stdTariffChgId" value="%{stdTariffChgId}" />

     <tr>   
      <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].lumpsumPeriodicity" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].lumpsumPeriodicity" value="%{lumpsumPeriodicity}" />
     <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].lumpsumAmount" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].lumpsumAmount" value="%{lumpsumAmount}" />
      <s:if test="%{!renewalFlag}">
        <td><s:div theme="simple" id="contractChargeDtlsDTOList[%{#stat.index}].selectedSpan" >
        <s:checkbox theme="simple" name="contractChargeDtlsDTOList[%{#stat.index}].selected" onclick="checkOnSelectAll(chgListSize,'contractChargeDtlsDTOList',selectAllChgCodes);" 
                    id="contractChargeDtlsDTOList[%{#stat.index}].selected"/>
                    </s:div></td>     
        </s:if>           
        <td nowrap="nowrap" width="200"><s:textfield id="contractChargeDtlsDTOList[%{#stat.index}].chargeCode" theme="simple" onblur="populateChargeDesc(%{#stat.index})"
                name="contractChargeDtlsDTOList[%{#stat.index}].chargeCode" value="%{chargeCode}" cssStyle="width: 150px;" cssClass="inputCaps"
                    onchange="replaceSpacesObjectUpper(this,true);"/>
                <span id="contractChargeDtlsDTOList[<s:property value="#stat.index"/>].chgCodeDialodDIV">
                   <sj:a  onclick="assignRowIndex(%{#stat.index});loadChargeCodes(%{#stat.index});"  href="#">
                        <img align="absmiddle" src="images/bttns/bttn-lookup.gif" alt="" />
                   </sj:a>
                 </span>
        </td>
        <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].chargeCalcType" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].chargeCalcType" value="%{chargeCalcType}" />
        <s:hidden id="contractChargeDtlsDTOList[%{#stat.index}].chargeCalcTypeDesc" 
                        name="contractChargeDtlsDTOList[%{#stat.index}].chargeCalcTypeDesc" value="%{chargeCalcTypeDesc}"/>                         

        <td>
             <span id="contractChargeDtlsDTOList[<s:property value="#stat.index"/>].chargeDescription">
                    <s:property  value="%{chargeDescription}" />
             </span>

             <s:textfield  theme="simple" id="contractChargeDtlsDTOList[%{#stat.index}].chargeDescriptionText"
             name="contractChargeDtlsDTOList[%{#stat.index}].chargeDescription" value="%{chargeDescription}" 
                        cssStyle="display:none" />

       </td>
      <s:if test="%{!stdTariff}">
        <td nowrap="nowrap" ><s:textfield id="contractChargeDtlsDTOList[%{#stat.index}].billToCustomerName" theme="simple"
                            name="contractChargeDtlsDTOList[%{#stat.index}].billToCustomerName" value="%{billToCustomerName}" cssStyle="width: 75px;" cssClass="inputs"/>
            <sj:a href="#" id="billLink1" onclick="assignRowIndex(%{#stat.index});openCodeDetail('BTC');"><img align="absmiddle" src="images/bttns/bttn-lookup.gif" alt="" /></sj:a>
        </td>  
      </s:if>       
        <td><sj:datepicker name="contractChargeDtlsDTOList[%{#stat.index}].validFrom" size="10" cssClass="inputs" value="%{validFrom}"
                            showOn="focus" label="DD/MM/YYYY" displayFormat="dd/mm/yy" changeMonth="true" changeYear="true"/></td>            
        <td><sj:datepicker name="contractChargeDtlsDTOList[%{#stat.index}].validTo" size="10" cssClass="inputs" value="%{validTo}"
                            showOn="focus" label="DD/MM/YYYY" displayFormat="dd/mm/yy" changeMonth="true" changeYear="true"/></td>
        <td><s:div theme="simple" id="contractChargeDtlsDTOList[%{#stat.index}].editedSpan" style="display:none">
                <img align="absmiddle" src="images/edited.gif" alt="" /></s:div>
        </td>
        <td>
            <input type="button" value="Price" class="ui-button ui-widget ui-state-default" 
                            onclick="openPriceDialog('<s:property value="%{#stat.index}"/>')">

    </tr>        
    </s:iterator>