View Javadoc
1   package gboat2.base.view.jsp;
2   
3   import gboat2.base.view.GboatViewUtil;
4   import gboat2.base.view.components.Menu;
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 Menu
16   * 
17   * @author <a href="mailto:[email protected]">何明旺</a>
18   * @since 3.0
19   * @date 2014年6月10日
20   */
21  public class MenuTag extends AbstractClosingTag {
22  
23  	private static final long serialVersionUID = 594523103591646134L;
24  
25      protected String targets;
26      protected String href;
27      protected String paramName;
28      protected Object list;
29      protected String listKey;
30      protected String listValue;
31  
32      @Override
33  	public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
34  		return new Menu(stack, req, res);
35  	}
36  
37      @Override
38  	protected void populateParams() {
39  		super.populateParams();
40  		GboatViewUtil.populateParams(this, component);
41  	}
42  
43      public void setTargets(String targets) {
44          this.targets = targets;
45      }
46  
47      public void setHref(String href) {
48          this.href = href;
49      }
50  
51      public void setParamName(String paramName) {
52          this.paramName = paramName;
53      }
54  
55      public void setList(Object list) {
56          this.list = list;
57      }
58  
59      public void setListKey(String listKey) {
60          this.listKey = listKey;
61      }
62  
63      public void setListValue(String listValue) {
64          this.listValue = listValue;
65      }
66  }