View Javadoc
1   package gboat2.base.view.jsp;
2   
3   import gboat2.base.view.GboatViewUtil;
4   import gboat2.base.view.components.Page;
5   
6   import javax.servlet.http.HttpServletRequest;
7   import javax.servlet.http.HttpServletResponse;
8   
9   import org.apache.struts2.components.Component;
10  import org.apache.struts2.views.jsp.ComponentTagSupport;
11  
12  import com.opensymphony.xwork2.util.ValueStack;
13  
14  /**
15   * @see Page
16   */
17  public class PageTag extends ComponentTagSupport {
18  
19      private static final long serialVersionUID = -1585165567043278243L;
20  
21      /** 继承页面(父页面) */
22      protected String extend;
23  
24      /** 父页面的字符编码 */
25      protected String encoding;
26      
27      protected String readonly;
28      
29      @Override
30      public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
31          return new Page(stack, req, res);
32      }
33  
34      @Override
35      protected void populateParams() {
36          super.populateParams();
37          GboatViewUtil.populateParams(this, component);
38      }
39  
40      public void setExtend(String extend) {
41          this.extend = extend;
42      }
43  
44      public void setEncoding(String encoding) {
45          this.encoding = encoding;
46      }
47  
48      public void setReadonly(String readonly) {
49          this.readonly = readonly;
50      }
51  
52  }