A related concept is when another bean wants to have a possible veto over a change to a property, as in, for example, requiring a number to be in a certain range. |
The set method of the property throws an exception called java.beans.PropertyVetoException. |
The object must also support (by having add and remove methods) a VetoableChangeListener, i.e. the constrained property is also bound. |
Then each bean that wants to be able to veto property changes implements VetoableChangeListener by supplying the method vetoableChange(PropertyChangeEvent e) throws PropertyVetoException |