我遇到了显示ArrayList
2750 行的问题。显示行的struts代码是:
<c:forEach items="${customerlist}" var="beneficiaryListval"varStatus="ForIndex" >
<tr id="<c:out value="${beneficiaryListval.customerId}" />">
<td><c:out value="${beneficiaryListval.fullName}" /></td>
<td><c:out value="${beneficiaryListval.mobileNo}" /></td>
<td><c:out value="${beneficiaryListval.passportNo}" /></td>
<td><c:out value="${beneficiaryListval.beneficiaryCount}" /></td>
</tr>
<%rowID++;%>
</c:forEach>
对此的操作方法是:
public ActionForward load(ActionMapping actionMapping,ActionForm actionForm,HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
try {
mtmrsLogger.entering("BeneficiaryAction", "load");
BeneficiaryForm beneficiaryForm = (BeneficiaryForm) actionForm;
ArrayList customerlist = customerManager.getCustomerForBeneficiaryWithCount();
httpServletRequest.setAttribute("customerlist", customerlist);
beneficiaryForm.setPageStatus("CustomerGrid");
return actionMapping.findForward(Constants.getInstance().SUCCESS);
}
现在我需要中断ArrayList customerlist
并以 50 个块发送到 JSP 并在 JSP 中显示或显示它们,以便在渲染时不会很慢。