1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.common.ui.client.event;
17
18 import org.kuali.student.common.ui.client.mvc.HasActionState;
19
20
21
22
23
24
25
26
27 public class SaveActionEvent extends ActionEvent<SaveActionHandler> implements HasActionState{
28 public static final Type<SaveActionHandler> TYPE = new Type<SaveActionHandler>();
29
30 private ActionState actionState;
31 private String message = "Saving";
32 private boolean acknowledgeRequired = true;
33 private boolean gotoNextView = false;
34 private boolean saveSuccessful = false;
35
36 public SaveActionEvent(){
37 }
38
39 public SaveActionEvent(boolean gotoNextView){
40 this.gotoNextView = gotoNextView;
41 }
42
43 public SaveActionEvent(String message){
44 this.message = message;
45 }
46
47 @Override
48 protected void dispatch(SaveActionHandler handler) {
49 handler.doSave(this);
50 }
51
52 @Override
53 public Type<SaveActionHandler> getAssociatedType() {
54 return TYPE;
55 }
56
57
58 public void setActionState(ActionState state){
59 this.actionState = state;
60 }
61
62
63
64
65 @Override
66 public ActionState getActionState() {
67 return this.actionState;
68 }
69
70 public String getMessage(){
71 return message;
72 }
73
74 public boolean isAcknowledgeRequired() {
75 return acknowledgeRequired;
76 }
77
78 public void setAcknowledgeRequired(boolean acknowledgeRequired) {
79 this.acknowledgeRequired = acknowledgeRequired;
80 }
81
82 public boolean gotoNextView(){
83 return gotoNextView;
84 }
85
86 public void setGotoNextView(boolean gotoNextView) {
87 this.gotoNextView = gotoNextView;
88 }
89
90 public void setSaveSuccessful(boolean saveSuccessful) {
91 this.saveSuccessful = saveSuccessful;
92 }
93
94 public boolean isSaveSuccessful() {
95 return saveSuccessful;
96 }
97
98 }