Basic HTML version of Foils prepared May 19 99

Foil 29 Updating a Constrained Property Value

From Javabeans Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Geoffrey Fox, Nancy McCracken, Wojtek Furmanski


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.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999