Updating a Constrained Property Value
To update a constrained property value:
- notify all vetoable listeners that a change is about to occur, using the fireVetoableChange method of the VetoableChangeSupport class, which passes the proposed update to the vetoable listeners.
- If a listener wants to veto the update, it will throw a PropertyVetoException from its VetoableChange method.
- If none of the vetoable listeners has thrown a PropertyVetoException, then proceed with the update.
- Notify all property listeners that a change has occurred.
If more than one bean wants to veto property changes, then it may be quite complicated to work out when to keep the old value or move to the new value.