1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.struts2.views.jsp.ui;
19
20 import javax.servlet.http.HttpServletRequest;
21 import javax.servlet.http.HttpServletResponse;
22
23 import org.apache.struts2.components.Component;
24 import org.apache.struts2.components.Submit;
25
26 import com.opensymphony.xwork2.util.ValueStack;
27
28 /***
29 * @see Submit
30 */
31 public class SubmitTag extends AbstractUITag {
32
33 private static final long serialVersionUID = 2179281109958301343L;
34
35 protected String action;
36 protected String method;
37 protected String align;
38 protected String resultDivId;
39 protected String onLoadJS;
40 protected String notifyTopics;
41 protected String listenTopics;
42 protected String preInvokeJS;
43 protected String type;
44 protected String src;
45
46 public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
47 return new Submit(stack, req, res);
48 }
49
50 protected void populateParams() {
51 super.populateParams();
52
53 Submit submit = ((Submit) component);
54 submit.setAction(action);
55 submit.setMethod(method);
56 submit.setAlign(align);
57 submit.setResultDivId(resultDivId);
58 submit.setOnLoadJS(onLoadJS);
59 submit.setNotifyTopics(notifyTopics);
60 submit.setListenTopics(listenTopics);
61 submit.setPreInvokeJS(preInvokeJS);
62 submit.setType(type);
63 submit.setSrc(src);
64 }
65
66 public void setAction(String action) {
67 this.action = action;
68 }
69
70 public void setMethod(String method) {
71 this.method = method;
72 }
73
74 public void setAlign(String align) {
75 this.align = align;
76 }
77
78 public void setResultDivId(String resultDivId) {
79 this.resultDivId = resultDivId;
80 }
81
82 public void setOnLoadJS(String onLoadJS) {
83 this.onLoadJS = onLoadJS;
84 }
85
86 public void setNotifyTopics(String notifyTopics) {
87 this.notifyTopics = notifyTopics;
88 }
89
90 public void setListenTopics(String listenTopics) {
91 this.listenTopics = listenTopics;
92 }
93
94 public void setPreInvokeJS(String preInvokeJS) {
95 this.preInvokeJS = preInvokeJS;
96 }
97
98 public String getType() {
99 return type;
100 }
101
102 public void setType(String type) {
103 this.type = type;
104 }
105
106 public String getSrc() {
107 return src;
108 }
109
110 public void setSrc(String src) {
111 this.src = src;
112 }
113 }