xxx.java
public class PaginationTag extends TagSupport {
private String page_obj;
/**
* The form name in which the pagination scripts reside.
*/
protected String name = null;
/**
* The HTML FORM name.
* If it is missing, the default vaule is as the same as name attribute.
*/
protected String formName = null;
/**
* The query method of the action.
*/
protected String actionMethod = null;
/**
* actionMethod只能接受固定的方法名,这个变量动态的从form中读取分页的查询方法。
* 特别适用于导航树的分页。 -- 2005-09-28
*/
protected String isDynamicMethod = null;
/**
* The current page num.
*/
protected String currentPage = null;
/**
* The totalPage num.
*/
protected String totalPage = null;
/**
* The request page num.
*/
protected String requestPage = null;
/**
* The total record num.
*/
protected String totalRecord = null;
/**
* javascript function
*/
protected String onClick = null;
public int doStartTag() throws JspException {
lookup();
//System.err.print("\n name and page_obj " + "\n" + name + "\t page_obj \n");
//System.err.print("\n actionMethod :" + actionMethod + "\n");
Page page_vo = ((Page)RequestUtils.lookup(pageContext, name, page_obj, null));
//System.err.println("aaaaaaaaaa=="+pageContext.toString());
// System.err.println(RequestUtils.message(super.pageContext, null, null, "air.first.page"));
// System.err.println(CommTools.getValueFromPropertiesKey("air.first.page", super.pageContext));
//pageContext.findAttribute(name) // get form - bean!
//PropertyUtils.getProperty(bean, property); // get property!
//int iCurrentPage = page_vo.
//*
int iTotalPage = page_vo.getTotalPage();
int iRequestPage = page_vo.getRequestPage();
//int iCurrentPage = page_vo.getCurrentPage();
int iTotalRecord = page_vo.getTotalRecord();
int iPageSize = page_vo.getPAGE_SIZE();