1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts2.views.jsp.ui;
22
23 import javax.servlet.http.HttpServletRequest;
24 import javax.servlet.http.HttpServletResponse;
25
26 import org.apache.struts2.components.Component;
27 import org.apache.struts2.components.OptGroup;
28 import org.apache.struts2.views.jsp.ComponentTagSupport;
29
30 import com.opensymphony.xwork2.util.ValueStack;
31
32 /***
33 *
34 */
35 public class OptGroupTag extends ComponentTagSupport {
36
37 private static final long serialVersionUID = 7367401003498678762L;
38
39 protected String list;
40 protected String label;
41 protected String disabled;
42 protected String listKey;
43 protected String listValue;
44
45 public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
46 return new OptGroup(stack, req, res);
47 }
48
49 protected void populateParams() {
50 super.populateParams();
51
52 OptGroup optGroup = (OptGroup) component;
53 optGroup.setList(list);
54 optGroup.setLabel(label);
55 optGroup.setDisabled(disabled);
56 optGroup.setListKey(listKey);
57 optGroup.setListValue(listValue);
58 }
59
60 public void setList(String list) {
61 this.list = list;
62 }
63
64 public void setLabel(String label) {
65 this.label = label;
66 }
67
68 public void setDisabled(String disabled) {
69 this.disabled = disabled;
70 }
71
72 public void setListKey(String listKey) {
73 this.listKey = listKey;
74 }
75
76 public void setListValue(String listValue) {
77 this.listValue = listValue;
78 }
79 }