在基于Struts的应用程序上工作时,我需要从数据库中加载并显示7000条记录,jsp页面需要花费更多时间来渲染7000条记录,并且在加载数据时浏览器会受到攻击。这是我的代码...我不知道如何在滚动reahes bottom时显示数据而我从未使用过AJAX。请帮我。
<div id="scroll" style="height: 225px;position: relative;width: 100%; overflow:hidden; ">
<table id="mytable" class="tablesorter" style="width: 983px;" >
<thead >
<tr style="height:14px;width: 100%;" >
<th style="width: 5%;"><bean:message key="test.grid.date"/></th>
<th style="width: 2%;" ><bean:message key="test.grid.type"/></th>
<th style="width: 4%;"><bean:message key="test.grid.checkFED"/></th>
</tr>
</thead>
<tbody style="height: 190px;margin-left: -2px;position:absolute;width: 1000px;overflow-x:hidden;overflow-y: scroll;">
<logic:iterate id="MaintDTO" indexId="index" name="maintForm" property="ReportList">
<logic:equal name="MaintDTO" property="transError" value="trans" >
<td style="width: 5%;"><bean:write name="MaintDTO" property="date" /></td>
<td style="width: 2%;"><bean:write name="MaintDTO" property="type" /></td>
<td style="width: 4%;"><bean:write name="MaintDTO" property="checkNo" /></td>
</logic:equal>
</logic:iterate></tbody>
</table>
</div>