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.Submit;
28
29 import com.opensymphony.xwork2.util.ValueStack;
30
31 /***
32 * @see Submit
33 */
34 public class SubmitTag extends AbstractUITag {
35
36 private static final long serialVersionUID = 2179281109958301343L;
37
38 protected String action;
39 protected String method;
40 protected String align;
41 protected String type;
42 protected String href;
43 protected String listenTopics;
44 protected String notifyTopics;
45 protected String loadingText;
46 protected String errorText;
47 protected String executeScripts;
48 protected String handler;
49 protected String formId;
50 protected String formFilter;
51 protected String src;
52 protected String showErrorTransportText;
53 protected String indicator;
54 protected String showLoadingText;
55
56
57
58 protected String beforeLoading;
59 protected String afterLoading;
60
61
62 protected String targets;
63
64 public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
65 return new Submit(stack, req, res);
66 }
67
68 protected void populateParams() {
69 super.populateParams();
70
71 Submit submit = ((Submit) component);
72 submit.setAction(action);
73 submit.setMethod(method);
74 submit.setAlign(align);
75 submit.setType(type);
76 submit.setHref(href);
77 submit.setListenTopics(listenTopics);
78 submit.setLoadingText(loadingText);
79 submit.setErrorText(errorText);
80 submit.setAfterLoading(afterLoading);
81 submit.setBeforeLoading(beforeLoading);
82 submit.setExecuteScripts(executeScripts);
83 submit.setHandler(handler);
84 submit.setFormFilter(formFilter);
85 submit.setFormId(formId);
86 submit.setSrc(src);
87 submit.setTargets(targets);
88 submit.setNotifyTopics(notifyTopics);
89 submit.setShowErrorTransportText(showErrorTransportText);
90 submit.setIndicator(indicator);
91 submit.setShowLoadingText(showLoadingText);
92 }
93
94 public void setAction(String action) {
95 this.action = action;
96 }
97
98 public void setMethod(String method) {
99 this.method = method;
100 }
101
102 public void setAlign(String align) {
103 this.align = align;
104 }
105
106 public String getType() {
107 return type;
108 }
109
110 public void setType(String type) {
111 this.type = type;
112 }
113
114 public void setHref(String href) {
115 this.href = href;
116 }
117
118 public void setErrorText(String errorText) {
119 this.errorText = errorText;
120 }
121
122 public void setLoadingText(String loadingText) {
123 this.loadingText = loadingText;
124 }
125
126 public void setListenTopics(String listenTopics) {
127 this.listenTopics = listenTopics;
128 }
129
130 public void setExecuteScripts(String executeScripts) {
131 this.executeScripts = executeScripts;
132 }
133
134 public void setHandler(String handler) {
135 this.handler = handler;
136 }
137
138 public void setFormFilter(String formFilter) {
139 this.formFilter = formFilter;
140 }
141
142 public void setFormId(String formId) {
143 this.formId = formId;
144 }
145
146 public void setSrc(String src) {
147 this.src = src;
148 }
149
150 public void setTargets(String targets) {
151 this.targets = targets;
152 }
153
154 @Deprecated
155 public void setResultDivId(String id) {
156 this.targets = id;
157 }
158
159 @Deprecated
160 public void setOnLoadJS(String postJS) {
161 this.afterLoading = postJS;
162 }
163
164 @Deprecated
165 public void setPreInvokeJS(String preJS) {
166 this.beforeLoading = preJS;
167 }
168
169 public void setNotifyTopics(String notifyTopics) {
170 this.notifyTopics = notifyTopics;
171 }
172
173 public void setShowErrorTransportText(String showErrorTransportText) {
174 this.showErrorTransportText = showErrorTransportText;
175 }
176
177 public void setIndicator(String indicator) {
178 this.indicator = indicator;
179 }
180
181 public void setShowLoadingText(String showLoadingText) {
182 this.showLoadingText = showLoadingText;
183 }
184 }