java代码:
@RequestMapping(value = "/student/classNewspaper/paging/{id}")
public ExtendedModelMap pagination(@PathVariable Long id, PageHelper pageHelper, HttpServletRequest request){
ExtendedModelMap model = new ExtendedModelMap();
TrainingClassVO currentClass = (TrainingClassVO) request.getSession().getAttribute(TRAINING_CLASS);
Map<String, Object> map = new HashMap<String, Object>();
map.put("companyId", currentClass.getCompanyId());
map.put("trainingClassId", currentClass.getId());
Map<String, Object> userCommentMap = userCommentService.loadUserCommentList(id, map, pageHelper);
model.put("userCommentMap", userCommentMap);
return model;
}
jsp代码:
<div id="content" class="easyui-panel">
            <ul class="comments">
                <c:forEach var="prop" items="${userCommentMap.rows}">
                    <li class="comment-item">
                        <div class="comment-meta">
                            回复人: <c:out value="${prop.commenterId}"/>
                            单位:<c:out value="${prop.companyId}"/>
                        </div>
                        <div class="comment-content">
                            <c:out value="${prop.content}"/>
                        </div>
                    </li>
                </c:forEach>
            </ul>
            </div>
            
            <div id="pp" class="easyui-pagination" style="background:#efefef;border:1px solid #ccc;"
                    data-options="
                    total: ${userCommentMap.total},
                    pageSize: 10,
                    onSelectPage : function(pageNumber, pageSize){
                     $('#content').panel('refresh', '${pageContext.request.contextPath}/student/classNewspaper/paging/'+${classNewspaper.id}+'.do?pageNumber='+pageNumber);
            }">小弟新手,问题描述:
  本来是ModelAndView跳转的这个页面的,分页的时候再用这个返回参数的话就会页面里面又有页面,现在想用返回Model,但是点下一页的时候刷新的那一块一只在loading,debug已经进入后台方法了,求助,另外我这个分页pagination是单独使用的没用跟datagrid一起使用JSPSpring MVCeasyuipagination

解决方案 »

  1.   

    建议使用火狐或者Chrome浏览器跟踪一下页面POST或者GET的数据。如果使用jQuery的datagrid自带的分页,操作会非常简单,自己搞个分页插件比较麻烦。分页这种操作,最好使用ajax吧,jQuery的ajax功能封装的很不错,Spring MVC也能返回ajax数据的
      

  2.   

    忘记说了,使用火狐或者Chrome浏览器跟踪一下页面POST或者GET的数据,是为了查看,你点击分页的时候,传了那些参数过去了