Bound properties tell interested listeners that their value has changed. For example, the
fileName property in
FilePickerBean is a bound property. When the file name changes, then
ImageViewerBean is automatically notified and loads the new file.
To implement a bound property, you must implement two mechanisms:
1. Whenever the value of the property changes, the bean must send a
PropertyChange event to all registered listeners. This change can occur when the
set method is called or when some other method (such as the action listener of the “. . .” button) changes the value.
2. To enable interested listeners to register themselves, the bean has to implement the following two methods:
void addPropertyChangeListener(PropertyChangeListener ...