View Javadoc
1   package gboat2.base.view.jsp;
2   
3   import gboat2.base.view.components.Include;
4   
5   import javax.servlet.http.HttpServletRequest;
6   import javax.servlet.http.HttpServletResponse;
7   
8   import org.apache.struts2.components.Component;
9   import org.apache.struts2.views.jsp.ComponentTagSupport;
10  
11  import com.opensymphony.xwork2.util.ValueStack;
12  
13  
14  /**
15   * 包含 Bundle 中的 JSP 页面
16   * @author <a href="mailto:[email protected]">何明旺</a>
17   * @since 3.0
18   * @date 2014年4月28日
19   */
20  public class IncludeTag extends ComponentTagSupport {
21  
22      private static final long serialVersionUID = 1L;
23  
24      protected String value;
25  
26      public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
27          return new Include(stack, req, res);
28      }
29  
30      protected void populateParams() {
31          super.populateParams();
32  
33          ((Include) component).setValue(value);
34      }
35  
36      public void setValue(String value) {
37          this.value = value;
38      }
39  }