亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pagertag.java

?? 這個是一個網站的簡單源碼
?? JAVA
字號:
  package com.jewel.tag.pagination;
/**
 * <p>Title: www.entel.com.cn</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: entel</p>
 * @author chendesheng
 * @version 1.0
 */

import java.lang.reflect.*;
import java.util.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import org.apache.commons.collections.*;
import org.apache.struts.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class PagerTag extends BodyTagSupport implements PagerInterface {
  protected Iterator iterator = null;
  protected int lengthCount = 0;
  protected int lengthValue = 0;
  protected MessageResources messages =
      MessageResources.getMessageResources(
      "org.apache.struts.taglib.logic.LocalStrings");
  protected int offsetValue = 0;
  protected boolean started = false;
  protected Object collection = null;

  public Object getCollection() {
    return (this.collection);
  }

  public void setCollection(Object collection) {
    this.collection = collection;
  }

  protected String id = null;

  public String getId() {
    return (this.id);
  }

  public void setId(String id) {
    this.id = id;
  }

  public int getIndex() {
    if (started) {
      return (offsetValue + lengthCount - 1);
    } else {
      return (0);
    }
  }

  protected String indexId = null;

  public String getIndexId() {
    return (this.indexId);
  }

  public void setIndexId(String indexId) {
    this.indexId = indexId;
  }

  protected String length = null;

  public String getLength() {
    return (this.length);
  }

  public void setLength(String length) {
    this.length = length;
  }

  protected String name = null;

  public String getName() {
    return (this.name);
  }

  public void setName(String name) {
    this.name = name;
  }

  protected String offset = null;

  public String getOffset() {
    return (this.offset);
  }

  public void setOffset(String offset) {
    this.offset = offset;
  }

  protected String property = null;

  public String getProperty() {
    return (this.property);
  }

  public void setProperty(String property) {
    this.property = property;
  }

  protected String scope = null;

  public String getScope() {
    return (this.scope);
  }

  public void setScope(String scope) {
    this.scope = scope;
  }

  protected String type = null;

  public String getType() {
    return (this.type);
  }

  public void setType(String type) {
    this.type = type;
  }

  public int doStartTag() throws JspException {
    Object collection = this.collection;
    HttpServletRequest hsr = (HttpServletRequest) pageContext.getRequest();
    HttpSession session = hsr.getSession(true);
    String sessionID = session.getId();
    int AllCountElement = 0;
    if (collection == null) {
      collection = RequestUtils.lookup(pageContext, name, property, scope);
    }
    if (collection == null) {
      JspException e = new JspException(messages.getMessage(
          "iterate.collection"));
      RequestUtils.saveException(pageContext, e);
      throw e;
    }
    if (collection.getClass().isArray()) {
      try {
        iterator = Arrays.asList( (Object[]) collection).iterator();
        //Common.AllElementCount = Array.getLength(collection);
        session.setAttribute(sessionID+"allcount",""+Array.getLength(collection));
        AllCountElement = Array.getLength(collection);
      } catch (ClassCastException e) {
        int length = Array.getLength(collection);
        //Common.AllElementCount = length;
        session.setAttribute(sessionID+"allcount",""+length);
        AllCountElement = length;
        ArrayList c = new ArrayList(length);
        for (int i = 0; i < length; i++) {
          c.add(Array.get(collection, i));
        }
        iterator = c.iterator();
      }
    } else if (collection instanceof Collection) {
      iterator = ( (Collection) collection).iterator();
      //Common.AllElementCount = ( (Collection) collection).size();
      session.setAttribute(sessionID+"allcount",""+( (Collection) collection).size());
      AllCountElement = ( (Collection) collection).size();
    } else if (collection instanceof Iterator) {
      iterator = (Iterator) collection;
      //Common.AllElementCount = Array.getLength(collection);
      session.setAttribute(sessionID+"allcount",""+Array.getLength(collection));
      AllCountElement = Array.getLength(collection);
    } else if (collection instanceof Map) {
      iterator = ( (Map) collection).entrySet().iterator();
      //Common.AllElementCount = ( (Map) collection).size();
      session.setAttribute(sessionID+"allcount",""+( (Map) collection).size());
      AllCountElement = ( (Map) collection).size();
    } else if (collection instanceof Enumeration) {
      iterator = IteratorUtils.asIterator( (Enumeration) collection);
      //Common.AllElementCount = Array.getLength(collection);
      session.setAttribute(sessionID+"allcount",""+Array.getLength(collection));
      AllCountElement = Array.getLength(collection);
    } else {
      JspException e = new JspException(messages.getMessage("iterate.iterator"));
      RequestUtils.saveException(pageContext, e);
      throw e;
    }
    // set Attribute of the "offset"
    String tmpoffset = hsr.getParameter("offset");
    if(tmpoffset != null && !tmpoffset.trim().equalsIgnoreCase("")){
      setOffset(tmpoffset);
    }else{
      try{
        String position = (String)session.getAttribute(sessionID+"offset");
        if(position == null||position.equalsIgnoreCase(""))
          position = "0";
        setOffset(position);
      }catch(Exception ex){
        setOffset("0");
      }
    }
    offsetValue = Integer.parseInt(getOffset());

    if (offsetValue < 0 || offsetValue>AllCountElement ) {
      offsetValue = 0;
    }
    // set out offset Value
    //Common.offset = offsetValue;
    session.setAttribute(sessionID+"offset",""+offsetValue);
    // set Attribute of the "length"
    String tmplength = hsr.getParameter("length");
    if(tmplength != null && !tmplength.trim().equalsIgnoreCase(""))
      length = tmplength;

    if (length == null) {
      lengthValue = 0;
    } else {
      try {
        lengthValue = Integer.parseInt(length);
      } catch (NumberFormatException e) {
        Integer lengthObject = (Integer) RequestUtils.lookup(pageContext,
            sessionID+"length", "session");
        if (lengthObject == null) {
          lengthValue = 0;
        } else {
          lengthValue = lengthObject.intValue();
        }
      }
    }
    if (lengthValue < 0) {
      lengthValue = 0;
    }
    lengthCount = 0;

    // set out the "length" attribute to Common.pageLength
    //Common.pageLength = lengthValue;
    session.setAttribute(sessionID+"length",""+lengthValue);

    for (int i = 0; i < offsetValue; i++) {
      if (iterator.hasNext()) {
        iterator.next();
      }
    }

    if (iterator.hasNext()) {
      Object element = iterator.next();
      if (element == null) {
        pageContext.removeAttribute(id);
      } else {
        pageContext.setAttribute(id, element);
      }
      lengthCount++;
      started = true;
      if (indexId != null) {
        pageContext.setAttribute(indexId, new Integer(getIndex()));
      }
      return (EVAL_BODY_AGAIN);
    } else {
      return (SKIP_BODY);
    }
  }

  public int doAfterBody() throws JspException {
    if (bodyContent != null) {
      ResponseUtils.writePrevious(pageContext, bodyContent.getString());
      bodyContent.clearBody();
    }

    if ( (lengthValue > 0) && (lengthCount >= lengthValue)) {
      return (SKIP_BODY);
    }

    if (iterator.hasNext()) {
      Object element = iterator.next();
      if (element == null) {
        pageContext.removeAttribute(id);
      } else {
        pageContext.setAttribute(id, element);
      }
      lengthCount++;
      if (indexId != null) {
        pageContext.setAttribute(indexId, new Integer(getIndex()));
      }
      return (EVAL_BODY_AGAIN);
    } else {
      return (SKIP_BODY);
    }
  }

  public int doEndTag() throws JspException {
    started = false;
    iterator = null;
    return (EVAL_PAGE);
  }

  public void release() {
    super.release();
    iterator = null;
    lengthCount = 0;
    lengthValue = 0;
    offsetValue = 0;
    id = null;
    collection = null;
    length = null;
    name = null;
    offset = null;
    property = null;
    scope = null;
    started = false;
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合久久天天| 日本一区二区三区国色天香| 久久久久久久国产精品影院| 亚洲四区在线观看| 丝袜亚洲另类欧美| 99久久国产免费看| 久久综合九色综合欧美就去吻| 亚洲色图在线播放| 国产美女娇喘av呻吟久久| 欧美日韩视频不卡| 1024成人网| 国产91精品一区二区麻豆亚洲| 欧美日韩国产一级二级| 一区二区三区在线视频免费| 国产 日韩 欧美大片| 日韩欧美国产高清| 婷婷亚洲久悠悠色悠在线播放| 国产成人av电影在线观看| 日韩无一区二区| 午夜精品福利一区二区三区蜜桃| 99久久伊人精品| 日本一区二区视频在线观看| 国内精品伊人久久久久av影院 | 久草中文综合在线| 国产丶欧美丶日本不卡视频| 日韩一区二区三区电影 | 一色桃子久久精品亚洲| 国产精品伊人色| 欧美成人乱码一区二区三区| 麻豆精品视频在线观看| 91精品国产色综合久久不卡电影 | 欧美影片第一页| 亚洲色图色小说| 成人av网站大全| 国产精品久久久一区麻豆最新章节| 国产精品中文字幕日韩精品 | 欧美三级在线视频| 亚洲夂夂婷婷色拍ww47| 91麻豆国产福利在线观看| 亚洲人成网站精品片在线观看| 一本一道综合狠狠老| 一区二区三区日韩精品视频| 欧美性欧美巨大黑白大战| 一区二区三区精品久久久| 欧美亚洲国产bt| 免费在线观看成人| 欧美va亚洲va香蕉在线| 国产一区二三区| 国产精品色呦呦| 91成人国产精品| 日本在线不卡视频一二三区| 日韩精品一区二区三区中文不卡| 国产一区二区在线免费观看| 国产精品国产精品国产专区不蜜| 在线亚洲精品福利网址导航| 日韩激情一二三区| 久久先锋影音av鲁色资源网| 99久久99久久久精品齐齐| 亚洲va天堂va国产va久| 精品国产一区二区亚洲人成毛片| 国产一区二区三区av电影| 亚洲欧美日韩电影| 91麻豆精品国产91久久久资源速度| 国产一区二区网址| 最近日韩中文字幕| 日韩欧美国产一区二区在线播放 | 欧美国产一区在线| 在线观看视频欧美| 国精产品一区一区三区mba视频| 国产精品人妖ts系列视频| 欧美日本国产一区| 成人精品gif动图一区| 亚洲18色成人| 中文字幕电影一区| 欧美一区二区在线视频| 成人涩涩免费视频| 秋霞成人午夜伦在线观看| ●精品国产综合乱码久久久久 | 亚洲国产精品99久久久久久久久| 91搞黄在线观看| 国产精品18久久久久久vr| 亚欧色一区w666天堂| 国产精品免费久久久久| 日韩午夜中文字幕| 欧美性猛片xxxx免费看久爱| 粉嫩蜜臀av国产精品网站| 日本vs亚洲vs韩国一区三区二区 | 在线一区二区三区做爰视频网站| 国产在线精品免费av| 亚洲午夜视频在线| 亚洲欧美在线aaa| 久久欧美一区二区| 欧美日本精品一区二区三区| 99国产精品一区| 国产99久久久久久免费看农村| 日本强好片久久久久久aaa| 中文字幕一区二区三区av| 精品免费国产二区三区| 欧美色爱综合网| 日本道在线观看一区二区| 成人一区二区在线观看| 国产一区二区女| 狠狠狠色丁香婷婷综合激情| 日本伊人精品一区二区三区观看方式 | 日韩成人一级大片| 亚洲成人动漫精品| 一区二区激情视频| 亚洲丝袜自拍清纯另类| 国产精品无码永久免费888| 久久久噜噜噜久噜久久综合| 精品对白一区国产伦| 欧美va在线播放| 久久先锋影音av鲁色资源| 日韩你懂的电影在线观看| 3d动漫精品啪啪1区2区免费| 91精品免费观看| 日韩视频在线观看一区二区| 日韩欧美国产小视频| 日韩欧美激情四射| 久久久久99精品一区| 国产日韩视频一区二区三区| 国产精品午夜免费| 玉足女爽爽91| 亚洲va国产va欧美va观看| 午夜精品福利久久久| 日日夜夜一区二区| 国内精品久久久久影院一蜜桃| 国产一区二区三区高清播放| 国产白丝精品91爽爽久久| 高清国产午夜精品久久久久久| 成人少妇影院yyyy| 在线免费观看一区| 欧美刺激脚交jootjob| 亚洲精品在线免费播放| 中文字幕国产一区二区| 亚洲色图欧洲色图婷婷| 日韩精品色哟哟| 国产另类ts人妖一区二区| 99精品欧美一区二区三区小说 | 国产成人精品一区二区三区四区| 成人av电影在线观看| 欧美日韩一区中文字幕| 欧美成人女星排名| 国产精品久久久久久户外露出 | 欧美日韩中文字幕一区| 亚洲精品一区二区三区福利| 中文字幕欧美国产| 婷婷综合另类小说色区| 国产精品一区二区三区乱码| 91高清在线观看| 精品91自产拍在线观看一区| 中文字幕在线观看不卡视频| 亚洲一区二区三区四区在线| 国内精品视频一区二区三区八戒| caoporn国产一区二区| 欧美一区二区视频网站| 国产精品无遮挡| 美女视频黄频大全不卡视频在线播放 | 色久综合一二码| 久久久欧美精品sm网站 | 一区二区中文字幕在线| 五月天中文字幕一区二区| 国产成人精品一区二区三区四区 | 91原创在线视频| 日韩美女天天操| 亚洲一区二区三区在线| 成人免费毛片aaaaa**| 欧美一级夜夜爽| 亚洲一区二区三区三| 国产精品一二二区| 日韩亚洲欧美综合| 亚洲主播在线播放| 成人99免费视频| 2020国产精品自拍| 免费在线观看日韩欧美| 日本久久一区二区三区| 国产精品麻豆一区二区| 麻豆91免费看| 欧美日韩午夜在线| 一区二区三区毛片| 成人一区在线观看| 国产亚洲一区二区在线观看| 久久精品久久精品| 欧美精品色综合| 亚洲综合男人的天堂| 91亚洲国产成人精品一区二三| 久久精品网站免费观看| 精品亚洲成av人在线观看| 欧美一区二区在线观看| 五月天网站亚洲| 欧美精品在线一区二区三区| 一区二区三区四区乱视频| 在线亚洲+欧美+日本专区| 亚洲免费在线视频一区 二区| 94-欧美-setu| 亚洲综合色视频| 欧美日韩国产首页在线观看| 亚州成人在线电影| 欧美一区二区国产| 日韩国产欧美三级|