首页 > easyui的datagrid翻页停止响应

easyui的datagrid翻页停止响应

大概情况:服务器端使用S2SH框架,前端是easyui的datagrid控件在前端显示数据,分页能够正常加载,但是每次翻到第8页就停止响应,不仅仅是网页无响应,整个应用失去响应,tomcat无报错信息,有没有可能是缓存的问题?那应该怎么清缓存呢?

代码描述:
1. 后台返回json对象的函数

    @SuppressWarnings("unchecked")
public String listContactsData() {
    dataMap = new HashMap<String, Object>();
    System.out.println(page+" "+rows);
    contactList = contactDAO.findAllByPage(page, rows);
    dataMap.put("total", contactDAO.findAll().size());
    dataMap.put("rows", contactList);
    return SUCCESS;
}

2. 前端easyui代码

<table id="contacttable" title="联系人" style="width:1024px;height:auto" data-options="
            fitColumns:true,
            singleSelect:true,
            iconCls: 'icon-edit',
            idField:'id',
            url:'./listContactsData.action?randnum='+Math.floor(Math.random()*1000000),
            toolbar: '#toolbar',
            method: 'post',
            pageSize:20,   
            pageNumber:1,
            pagination:true">
    <thead>
        <tr>
            <th data-options="field:'id'">序号</th>
            <th data-options="field:'name',width:100,
                    editor:{
                        type:'text',
                        options:{required:true}
                        }">姓名</th>
        </tr>
    </thead>

</table>  
  1. datagrib的实现代码(js)

    $(function(){
    $('#contacttable').datagrid();
    });

【热门文章】
【热门文章】