滚动 下拉简单实现分页

1. 需要分页的jsp页面 添加滚动下拉触发事件

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../init.jsp"%>


        
    <%@include file="../head.jsp"%>
    康复之家    
   
   
    
    
        


      <%--  

           

               

                   
               

               

                   
                        

地址:${COOPERATE.province}${COOPERATE.city}${COOPERATE.area}>


                   

                    
                        

地址:深圳市宝安区福永街道白石厦社区福永大道78号广福大厦707>


                   

               

           
 
       
--%>
       

           

               
           

           

                
                        

地址:${COOPERATE.province}${COOPERATE.city}${COOPERATE.area}


                   

                    
                        

地址:深圳市宝安区福永街道白石厦社区福永大道78号广福大厦707


                   

           

            >
       

       

           

               

                   
               

               

                   

负责人:${COOPERATE.name==null?'王博伟':COOPERATE.name}  手机号:${COOPERATE.phone==null?'13607671755':COOPERATE.phone}


                   

病友数量:${USERSIZE==null?'0':USERSIZE}


               

           

       

        
       
       
        
        
        
        
        
        
       

           

               

                   
取消

                   
确定

               

               

                   

                       

                           

                   

                   

                       

                           

                   

                   

                       

                           

                   

               

           

       

   
   
    
 
 

2.controller层
 

    @RequestMapping("recoryHasfamilyList")
    public String recoryHasfamilyList(String page, String pageSize, HttpServletRequest request, ModelMap mm) {

                Pager pager = new Pager();
                    pager = this.lydActivityDao.queryLydActivitys(new Pager(Integer.valueOf(page == null ? "1" : page),
                            Integer.valueOf(pageSize == null ? "10" : pageSize)), null);
                
                mm.put("rows", pager.getResults());
                mm.put("total", pager.getTotal());
                mm.put("pageTotal", pager.getPageTotal());
                mm.put("pageSize", pager.getPageSize());

                mm.put("USER", user);
            }
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return "weixin/cooperate/recory-hasfamilylist";
    }

 

3.ajax返回一个页面 拼接到第一个jsp页面

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@include file="../head.jsp"%>
 			 	
	               
  • ${list.title}

    ${list.readcount}人浏览

  •  

     

    你可能感兴趣的:(滚动 下拉简单实现分页)