<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    夢幻之旅

    DEBUG - 天道酬勤

       :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      671 隨筆 :: 6 文章 :: 256 評論 :: 0 Trackbacks
     2010寫的一個jsp分頁標簽, 基本能實現任何效果分頁(如谷歌, 百度分頁, AJAX分頁等), 并且能保存查詢參數, 自認為比較強大, 下面記錄使用方法:
     先上一個效果:
     

    1. pagebar.jar加入lib

    2. action里代碼(最少只需要加入3行代碼):
    IConditionHelper helper = ConditionHelper.getInstance(ServletActionContext.getRequest());
                
                UserLstReq userLstReq 
    = new UserLstReq();
                userLstReq.setUserName(userName);
                userLstReq.setBeginIndex(helper.getBeginIndex());
                userLstReq.setPageSize(helper.getPageSize());
                
                helper.getCondition(userLstReq, UserLstReq.
    class);
                
                
                UserLstRes res 
    = userService.queryUsers(userLstReq);
                HttpServletRequest request 
    = ServletActionContext.getRequest();
                request.setAttribute(
    "list", res.getResultLst());
                request.setAttribute(
    "page"new BasePageBarBean(helper, res.getCount()));
       

    3. jsp代碼(最好是寫在一jsp里, 再include方便更改)
       <%@ taglib uri="http://www.huiwanpeng.com" prefix="p"%>
       
    <p:pagebar totalRowCount="${page.totalRowCount}" action="${page.action}" pageSize="${page.pageSize}" currentPageNum="${page.currentPageNum}" disableCss="color:green">
     總行數#totalRowCount#   
    |  
     總頁數#totalPageCount#  
    |
     當前第#currentPageNum#頁  
    |
     每頁數#pageSize# 
    | 
     
    <a onclick="#callFirstPageFun#">第一頁</a>| 
     
    <a onclick="#callForePageFun#"  style="#forePageDisableCss#">上一頁</a>|
     
    <a onclick="#callNextPageFun#" style="#nextPageDisableCss#">下一頁</a> | 
     
    <a onclick="#callLastPageFun#">最后頁</a> 
     
    <p:loop positiveStep="2" negativeStep="4" isFill="true" currentPageCss="color:red">
      
    <a style="#currentPageCss#" onclick="#callLoopPageFun#">#currentPageNum# </a>
     
    </p:loop>
     
    <input id="#inputPageNumId#" type="text" style="width:20px"/><input type="button" value="go" onclick="#callGoFun#"/>
       
    </p:pagebar>

    posted on 2014-06-20 11:53 HUIKK 閱讀(442) 評論(0)  編輯  收藏 所屬分類: Java
    主站蜘蛛池模板: 免费无码又爽又刺激高潮| 日韩精品无码专区免费播放| 18禁超污无遮挡无码免费网站国产| 四虎影视永久免费观看地址| 色偷偷尼玛图亚洲综合| 国产男女猛烈无遮挡免费视频 | 99精品视频免费观看| 久久亚洲精品成人| 久久永久免费人妻精品下载| 久久久无码精品亚洲日韩按摩 | 亚洲综合精品一二三区在线| 免费精品一区二区三区第35| 97se亚洲综合在线| 在线观看日本免费a∨视频| 亚洲人片在线观看天堂无码| 国产v片免费播放| 黄床大片免费30分钟国产精品| 亚洲av无码潮喷在线观看| 99久久久国产精品免费蜜臀| 亚洲一卡二卡三卡四卡无卡麻豆| 成年女人免费视频播放77777 | 亚洲一区中文字幕久久| 999国内精品永久免费视频| 亚洲欧美日韩一区二区三区在线| 免费人成激情视频| 免费人成网站在线观看不卡| 曰批全过程免费视频在线观看| 亚洲日本一区二区| 成人免费一级毛片在线播放视频| 亚洲日本va一区二区三区| 久久国产成人精品国产成人亚洲 | 亚洲第一区在线观看| 黄色网站软件app在线观看免费| 亚洲爱情岛论坛永久| 毛片免费观看视频| 中文字幕在线免费观看视频| 亚洲性色高清完整版在线观看| 日本高清色本免费现在观看| 久久国产乱子伦精品免费一| 亚洲成a∧人片在线观看无码| 亚洲级αV无码毛片久久精品|