View Javadoc
1   package gboat2.base.view.jsp;
2   
3   import gboat2.base.view.GboatViewUtil;
4   import gboat2.base.view.components.MenuItem;
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.ui.AbstractClosingTag;
11  
12  import com.opensymphony.xwork2.util.ValueStack;
13  
14  /**
15   * @see MenuItem
16   * 
17   * @author <a href="mailto:[email protected]">何明旺</a>
18   * @since 3.0
19   * @date 2014年6月10日
20   */
21  public class MenuItemTag extends AbstractClosingTag {
22  
23      private static final long serialVersionUID = 1L;
24  
25      protected String href;
26      protected String menuIcon;
27  
28      protected String onClickTopics;
29  
30      public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
31          return new MenuItem(stack, req, res);
32      }
33  
34      protected void populateParams() {
35          super.populateParams();
36          GboatViewUtil.populateParams(this, component);
37      }
38  
39      public void setHref(String href) {
40          this.href = href;
41      }
42  
43      public void setMenuIcon(String menuIcon) {
44          this.menuIcon = menuIcon;
45      }
46  
47      public void setOnClickTopics(String onClickTopics) {
48          this.onClickTopics = onClickTopics;
49      }
50  }