1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.common.ui.client.mvc;
17
18 import org.kuali.student.common.ui.client.mvc.ModelChangeEvent.Action;
19
20 import com.google.gwt.event.shared.HandlerManager;
21 import com.google.gwt.event.shared.HandlerRegistration;
22
23 public class AbstractSimpleModel implements Model {
24 private HandlerManager handlers = new HandlerManager(this);
25 @Override
26 public HandlerRegistration addModelChangeHandler(ModelChangeHandler handler) {
27 return handlers.addHandler(ModelChangeEvent.TYPE, handler);
28 }
29
30 protected void fireChangeEvent(Action action) {
31 handlers.fireEvent(new ModelChangeEvent(action, this));
32 }
33
34 }