01: /* BindingSaveEvent.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Wed Aug 1 08:34:40 TST 2007, Created by henrichen
10: }}IS_NOTE
11:
12: Copyright (C) 2006 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: }}IS_RIGHT
16: */
17: package org.zkoss.zkplus.databind;
18:
19: import org.zkoss.zk.ui.Component;
20: import org.zkoss.zk.ui.event.Event;
21:
22: /**
23: * Event used when DataBinder send "onBindingSave" events.
24: * @author henrichen
25: * @since 3.0.0
26: */
27: public class BindingSaveEvent extends Event {
28: private final Object _value;
29: private final Component _ref;
30: private final Binding _binding;
31:
32: /** Constructs a binding-relevant event.
33: * @param name the event name
34: * @param target the target that receive the event
35: * @param reference the reference component that "trigger" the event
36: * @param binding the associated binding of this event.
37: * @param value the value associated with the binding.
38: */
39: public BindingSaveEvent(String name, Component target,
40: Component reference, Binding binding, Object value) {
41: super (name, target);
42: _ref = reference;
43: _binding = binding;
44: _value = value;
45: }
46:
47: /** Gets the reference component that "trigger" sending of this event.
48: */
49: public Component getReference() {
50: return _ref;
51: }
52:
53: /** Gets the associate binding of this event.
54: */
55: public Binding getBinding() {
56: return _binding;
57: }
58:
59: /** Gets the value to be saved after "onBindingSave" event.
60: */
61: public Object getValue() {
62: return _value;
63: }
64: }
|