提前致谢。 我有包含豆子的清单。我需要显示所有记录以便编辑用户。 我使用s:iterator进行显示。 问题: - 1.为了加载那些记录,加载页面需要很多时间 2.加载jsp页面后,提交页面崩溃。
在这种情况下请帮助设计正确的方法。 业务约束: - 1.用户可以编辑记录 2.将新记录添加/删除到现有列表 3.通过文件上传将批量数据添加到列表
示例代码: -
<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>