📄 traditionpagination.java
字号:
package org.speedframework.tag;
//~--- non-JDK imports --------------------------------------------------------
import org.speedframework.entity.Pagination;
//~--- JDK imports ------------------------------------------------------------
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
/**
* 类描述信息,描述类的主要职责和用处。
*
*
* @version $LastChangedRevision: 1945 $, 2007.09.29 at 02:14:14 CST
* @author <a href="mailto:falcon8848@gmail.com">piginzoo </a>
*/
public class TraditionPagination extends AbsSpeedStyle implements IPaginationTag
{
/**
*
*/
private static final long serialVersionUID = 7628624849965836710L;
/**
* 方法描述信息,
* 描述方法是做什么的,
* 如何调用,最好给出调用代码示例。
*
* @return
*
* @throws JspException
*/
public int doStartTag() throws JspException {
JspWriter out = pageContext.getOut();
try {
if (this.getName() == null) {
this.setName("pagination");
}
if (this.getParameter() == null) {
this.setParameter("page");
}
if (this.getPath() == null) {
throw new NullPointerException("path is null");
}
this.setPagination((Pagination) pageContext.getRequest().getAttribute(this.getName()));
if (this.getPagination() == null) {
throw new NullPointerException(this.getName() + "is null in request");
}
// this.setFirstTitle("[????]");
// this.setPreviousTitle("[???]");
// this.setNextTitle("[????]");
// this.setLastTitle("[?????]");
// this.setTotalTitle("[????]");
if (this.getPagination().isHasPreviousPage()) {
out.println(super.isHasPrevious());
} else {
out.println(super.notHasPrevious());
}
if (this.getPagination().isHasNextPage()) {
out.println(super.isHasNext());
} else {
out.println(super.notHasNext());
}
out.println(super.showTotal());
out.println(super.showPage());
} catch (IOException e) {
throw new JspException(e);
}
return SKIP_BODY;
}
/**
* 方法描述信息,
* 描述方法是做什么的,
* 如何调用,最好给出调用代码示例。
*
* @return
*
* @throws JspException
*/
public int doEndTag() throws JspException {
return EVAL_PAGE;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -