开发学院软件开发Java 分页标签 阅读

分页标签

 2009-09-26 00:00:00 来源:WEB开发网   
核心提示: 3.PageTag.java1packagecn.com.sunrise.home.util;2/**//*3*Tochangethistemplate,chooseTools|Templates4*andopenthetemplateintheeditor.5*/678importcom.op

3.PageTag.java

 1package cn.com.sunrise.home.util;   
 2/**//*  
 3 * To change this template, choose Tools | Templates  
 4 * and open the template in the editor.  
 5 */  
 6  
 7  
 8import com.opensymphony.xwork2.util.ValueStack;   
 9import javax.servlet.http.HttpServletRequest;   
10import javax.servlet.http.HttpServletResponse;   
11import org.apache.struts2.components.Component;   
12import org.apache.struts2.views.jsp.ComponentTagSupport;   
13  
14/** *//**  
15 * 分页标签  
16 * @author xiongwei  
17 */  
18public class PageTag extends ComponentTagSupport {   
19       
20    private String pageNo;   
21    private String total;   
22    private String styleClass;   
23    private String theme;   
24    private String includes;   
25       
26    public void setTheme(String theme) {   
27        this.theme = theme;   
28    }       
29    public void setStyleClass(String styleClass) {   
30        this.styleClass = styleClass;   
31    }   
32    public void setPageNo(String pageNo) {   
33        this.pageNo = pageNo;   
34    }   
35    public void setTotal(String total) {   
36        this.total = total;   
37    }   
38    public String getIncludes() {   
39        return includes;   
40    }   
41    public void setIncludes(String includes) {   
42        this.includes = includes;   
43    }   
44  
45    @Override  
46    public Component getBean(ValueStack arg0, HttpServletRequest arg1, HttpServletResponse arg2) {   
47        return new Pages(arg0, arg1);   
48    }   
49  
50    protected void populateParams() {   
51        super.populateParams();   
52           
53        Pages pages = (Pages)component;   
54        pages.setPageNo(pageNo);   
55        pages.setIncludes(includes);   
56        pages.setTotal(total);   
57        pages.setStyleClass(styleClass);   
58        pages.setTheme(theme);   
59  
60    }   
61} 

上一页  1 2 3 4  下一页

Tags:标签

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接