濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > 一個(gè)通用的jsp分頁(yè)P(yáng)ageBean

一個(gè)通用的jsp分頁(yè)P(yáng)ageBean

熱門(mén)標(biāo)簽:商丘百應(yīng)電話(huà)機(jī)器人有沒(méi)有效果 地圖標(biāo)注人員兼職 漯河辦理400電話(huà) 淮南騰訊地圖標(biāo)注 騰訊地圖標(biāo)注商戶(hù)改名注冊(cè)入駐 電話(huà)機(jī)器人的特色和創(chuàng)新 黃石智能營(yíng)銷(xiāo)電銷(xiāo)機(jī)器人效果 怎樣把地圖標(biāo)注出來(lái) 開(kāi)封便宜外呼系統(tǒng)報(bào)價(jià)
package com.shaccp.web.util;
import java.util.List;
public class PageBean {
/**
*
*
* @author ppy 2008-10-18 14:3:56
* totalRecords 總記錄數(shù)
* list 保存分頁(yè)的數(shù)據(jù)
* pageNo 當(dāng)前頁(yè)
* pageSize 頁(yè)大小
* query 保存用戶(hù)查詢(xún)的字符串
* pageAction 操作分頁(yè)的Servlet或Action(struts)
* method (struts中Action對(duì)應(yīng)的method)
*
*
*/
private int totalRecords;
private List list;
private int pageNo;
private int pageSize;
private String query;
private String pageAction;
private String method;
public void setPageAction(String pageAction) {
this.pageAction = pageAction;
}
public void setMethod(String method) {
this.method = method;
}
public List getList() {
return list;
}
public void setList(List list) {
this.list = list;
}
public int getPageNo() {
return pageNo;
}
public void setPageNo(int pageNo) {
this.pageNo = pageNo;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalRecords() {
return totalRecords;
}
public void setTotalRecords(int totalRecords) {
this.totalRecords = totalRecords;
}
public void setQuery(String query) {
this.query = query;
}
/**
* 取得總頁(yè)數(shù)的方法 return
* totalRecords%pageSize==0?(totalRecords/pageSize):(totalRecords/pageSize+1)
*
* @return
*/
public int getTotalPages() {
return (totalRecords + pageSize - 1) / pageSize;
}
/**
* 得到首頁(yè)
*
* @return
*/
public int getTopPage() {
return 1;
}
/**
* 得到上一頁(yè)
*
* @return
*/
public int getPreviousPageNo() {
if (pageNo = 1)
return 1;
else
return (pageNo - 1);
}
/**
* 得到下一頁(yè)
*
* @return
*/
public int getNextPageNo() {
if (pageNo >= getTotalPages()) {
return getTotalPages() == 0 ? 1 : getTotalPages();
} else {
return pageNo + 1;
}
}
/**
* 得到尾頁(yè)
*
* @return
*/
public int getBottomPageNo() {
return getTotalRecords() == 0 ? 1 : getTotalPages();
}
//頁(yè)面分頁(yè)導(dǎo)航的鏈接 方式一
public String getPageToolBar1() {
String str = "";
str += "a href='" + pageAction + "?method=" + method + "userQuery="
+ query + "pageNo=" + getPreviousPageNo() + "pageSize="
+ pageSize + "'>上一頁(yè)/a>nbsp;";
str += "a href='" + pageAction + "?method=" + method + "userQuery="
+ query + "pageNo=" + getNextPageNo() + "pageSize="
+ pageSize + "'>下一頁(yè)/a>";
return str;
}
//頁(yè)面分頁(yè)導(dǎo)航的鏈接 方式二
public String getPageToolBar2() {
String str = "";
int pageSplit = (pageNo / 5) * 5;
for (int i = pageSplit - 1; i (pageSplit + 6); i++) {
if (i = 0) {
} else if (pageNo == i) {
str += i + "nbsp;";
} else if (i > getTotalPages()) {
} else {
str += "a href='" + pageAction + "?method=" + method
+ "userQuery=" + query + "pageNo=" + i + "pageSize="
+ pageSize + "'>" + i + "/a>" + "nbsp;";
}
}
return str;
}
}
您可能感興趣的文章:
  • jsp分頁(yè)顯示的實(shí)現(xiàn)代碼
  • JSP分頁(yè)顯示的實(shí)例代碼
  • 一個(gè)實(shí)用的JSP分頁(yè)代碼
  • JSP實(shí)現(xiàn)的簡(jiǎn)單分頁(yè)示例
  • jsp hibernate的分頁(yè)代碼
  • JSP自定義分頁(yè)標(biāo)簽TAG全過(guò)程
  • jsp+servlet+javabean實(shí)現(xiàn)數(shù)據(jù)分頁(yè)方法完整實(shí)例
  • JSP通用高大上分頁(yè)代碼(超管用)
  • jsp實(shí)現(xiàn)頁(yè)面分頁(yè)功能代碼
  • JSP實(shí)現(xiàn)分頁(yè)效果

標(biāo)簽:亳州 紅河 岳陽(yáng) 拉薩 鄭州 大興安嶺 馬鞍山 武威

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《一個(gè)通用的jsp分頁(yè)P(yáng)ageBean》,本文關(guān)鍵詞  一個(gè),通,用的,jsp,分頁(yè),PageBean,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《一個(gè)通用的jsp分頁(yè)P(yáng)ageBean》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于一個(gè)通用的jsp分頁(yè)P(yáng)ageBean的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    湟源县| 永城市| 如皋市| 恩平市| 娱乐| 卢氏县| 蒙城县| 平乐县| 山阳县| 河津市| 延吉市| 津南区| 济阳县| 奉贤区| 楚雄市| 绵阳市| 古交市| 怀柔区| 陆川县| 济源市| 吴江市| 三都| 文水县| 虹口区| 琼海市| 德化县| 临西县| 德州市| 武宣县| 东乡| 临安市| 汶上县| 巍山| 延安市| 临朐县| 义马市| 平顺县| 新安县| 井研县| 云南省| 崇州市|