1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
package org.demosys.web.user.action; |
7 |
|
import javax.servlet.http.HttpServletRequest; |
8 |
|
import org.apache.struts.action.ActionForm; |
9 |
|
import org.apache.struts.action.ActionMapping; |
10 |
|
import org.demosys.web.user.UserView; |
11 |
|
|
12 |
|
|
13 |
|
|
14 |
32 |
public class UserForm extends ActionForm { |
15 |
32 |
protected UserView _view = new UserView(); |
16 |
|
|
17 |
|
public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) { |
18 |
24 |
setComment(null); |
19 |
24 |
setName(null); |
20 |
24 |
setId(null); |
21 |
24 |
setEmail(null); |
22 |
24 |
} |
23 |
|
|
24 |
|
|
25 |
|
public String getName() { |
26 |
8 |
return _view.getName(); |
27 |
|
} |
28 |
|
|
29 |
|
|
30 |
|
public void setName(String name) { |
31 |
52 |
_view.setName(name); |
32 |
52 |
} |
33 |
|
|
34 |
|
|
35 |
|
public String getId() { |
36 |
4 |
return _view.getId(); |
37 |
|
} |
38 |
|
|
39 |
|
|
40 |
|
public void setId(String id) { |
41 |
56 |
_view.setId(id); |
42 |
56 |
} |
43 |
|
|
44 |
|
|
45 |
|
public String getEmail() { |
46 |
4 |
return _view.getEmail(); |
47 |
|
} |
48 |
|
|
49 |
|
|
50 |
|
public void setEmail(String email) { |
51 |
48 |
_view.setEmail(email); |
52 |
48 |
} |
53 |
|
|
54 |
|
|
55 |
|
public String getComment() { |
56 |
4 |
return _view.getComment(); |
57 |
|
} |
58 |
|
|
59 |
|
|
60 |
|
public void setComment(String comment) { |
61 |
48 |
_view.setComment(comment); |
62 |
48 |
} |
63 |
|
|
64 |
|
|
65 |
|
public UserView toUserView() { |
66 |
16 |
return (UserView)_view.clone(); |
67 |
|
} |
68 |
|
} |