1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.struts2.views.jsp.ui;
23
24 import javax.servlet.http.HttpServletRequest;
25 import javax.servlet.http.HttpServletResponse;
26
27 import org.apache.struts2.components.Component;
28 import org.apache.struts2.components.Submit;
29
30 import com.opensymphony.xwork2.util.ValueStack;
31
32 /***
33 * @see Submit
34 */
35 public class SubmitTag extends AbstractClosingTag {
36
37 private static final long serialVersionUID = 2179281109958301343L;
38
39 protected String action;
40 protected String method;
41 protected String align;
42 protected String type;
43 protected String src;
44
45 public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
46 return new Submit(stack, req, res);
47 }
48
49 protected void populateParams() {
50 super.populateParams();
51
52 Submit submit = ((Submit) component);
53 submit.setAction(action);
54 submit.setMethod(method);
55 submit.setAlign(align);
56 submit.setType(type);
57 submit.setSrc(src);
58 }
59
60 public void setAction(String action) {
61 this.action = action;
62 }
63
64 public void setMethod(String method) {
65 this.method = method;
66 }
67
68 public void setAlign(String align) {
69 this.align = align;
70 }
71
72 public String getType() {
73 return type;
74 }
75
76 public void setType(String type) {
77 this.type = type;
78 }
79
80 public void setSrc(String src) {
81 this.src = src;
82 }
83 }