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;
22
23 import java.util.Collection;
24 import java.util.List;
25 import java.util.Map;
26
27 import org.apache.struts2.views.jsp.ui.User;
28
29 import com.opensymphony.xwork2.Action;
30 import com.opensymphony.xwork2.ActionSupport;
31
32
33 /***
34 */
35 public class TestAction extends ActionSupport {
36
37 private static final long serialVersionUID = -8891365561914451494L;
38
39 private Collection collection;
40 private Collection collection2;
41 private Map map;
42 private String foo;
43
44 private String result;
45 private User user;
46 private String[] array;
47 private String[][] list;
48 private List list2;
49 private List list3;
50
51 public Collection getCollection() {
52 return collection;
53 }
54
55 public void setCollection(Collection collection) {
56 this.collection = collection;
57 }
58
59 public Map getMap() {
60 return map;
61 }
62
63 public void setMap(Map map) {
64 this.map = map;
65 }private Integer fooInt;
66
67 public String getFoo() {
68 return foo;
69 }
70
71 public void setFoo(String foo) {
72 this.foo = foo;
73 }
74
75 public String getResult() {
76 return result;
77 }
78
79 public void setResult(String result) {
80 this.result = result;
81 }
82
83 public User getUser() {
84 return user;
85 }
86
87 public void setUser(User user) {
88 this.user = user;
89 }
90
91 public String[] getArray() {
92 return array;
93 }
94
95 public void setArray(String[] array) {
96 this.array = array;
97 }
98
99 public String[][] getList() {
100 return list;
101 }
102
103 public void setList(String[][] list) {
104 this.list = list;
105 }
106
107 public List getList2() {
108 return list2;
109 }
110
111 public void setList2(List list2) {
112 this.list2 = list2;
113 }
114
115 public void setList3(List list) {
116 this.list3 = list;
117 }
118
119 public List getList3() {
120 return this.list3;
121 }
122
123 public Collection getCollection2() {
124 return this.collection2;
125 }
126
127 public void setCollection2(Collection collection) {
128 this.collection2 = collection;
129 }
130
131 public Integer getFooInt() {
132 return fooInt;
133 }
134
135 public void setFooInt(Integer fooInt) {
136 this.fooInt = fooInt;
137 }
138
139 public String execute() throws Exception {
140 if (result == null) {
141 result = Action.SUCCESS;
142 }
143
144 return result;
145 }
146
147 public String doInput() throws Exception {
148 return INPUT;
149 }
150
151 }