1
2 package com.pnpconsult.zeiterfassung.actions;
3
4 import javax.servlet.http.HttpServletRequest;
5
6 import org.apache.struts.action.ActionForm;
7 import org.apache.struts.action.ActionMapping;
8
9 /***
10 * @author <a href="mailto:powerpete@users.sf.net">Moritz Petersen </a>
11 * @version $Id: SubmitActionForm.java,v 1.2 2004/06/09 19:26:40 powerpete Exp $
12 */
13 public class SubmitActionForm extends ActionForm
14 {
15 private String ok;
16 private String cancel;
17 private String delete;
18
19 public void reset(ActionMapping mapping, HttpServletRequest request)
20 {
21 super.reset(mapping, request);
22 ok = null;
23 cancel = null;
24 delete = null;
25 }
26
27 public boolean userHasNotClicked()
28 {
29 return ok == null && cancel == null && delete == null;
30 }
31
32 public boolean userHasClickedOK()
33 {
34 return ok != null;
35 }
36
37 public boolean userHasClickedDelete()
38 {
39 return delete != null;
40 }
41
42 public boolean userHasClickedCancel()
43 {
44 return cancel != null;
45 }
46
47 public String getCancel()
48 {
49 return cancel;
50 }
51
52 public void setCancel(String cancel)
53 {
54 this.cancel = cancel;
55 }
56
57 public String getDelete()
58 {
59 return delete;
60 }
61
62 public void setDelete(String delete)
63 {
64 this.delete = delete;
65 }
66
67 public String getOk()
68 {
69 return ok;
70 }
71
72 public void setOk(String ok)
73 {
74 this.ok = ok;
75 }
76 }