🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7292

Re: firing a property veto exception

#7292
From: John McGrath TeamB
Date: Sat, 30 Jun 2001 23:22
31 lines
2066 bytes
On Sat, 30 Jun 2001 13:08:04 -0400, "CLG" <lamont_gilbert @ 
rigidsoftware.com> wrote:

> I disagree.  I am writing a bean, and I am the one responsible
> for creating the methods.  So i dont have any such objects
> premade and handed to me.  I am the maker in this event. 
> So my question is what should the maker of this object do.

You create the PropertyChangeEvent *before* the veto can occur.
The oldValue property is the previous (actually current) value
of the property, and the newValue property is the proposed new
value for the property.  This event is "fired" at all of the 
VetoableChangeListeners.

The VetoableChangeListeners receive that event in the vetoableChange() 
method, and throw a PropertyVetoException if they do not like the 
proposed change.  The constructor for PropertyVetoException takes a 
PropertyChangeEvent as an argument, which should be passed the same 
value that was passed to vetoableChange() as an argument.

No PropertyChangeEvent should ever be constructed by the listener
that vetoes the property change.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.15a81c058ddd641098a30c@forums.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3b3cee8f$1_2@dnews> <3b3da103_1@dnews> <3b3e0880$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e79ac2a4b52682c7
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-30 16:27:53 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: firing a property veto exception
Date: Sat, 30 Jun 2001 19:22:24 -0400
Message-ID: <MPG.15a81c058ddd641098a30c@forums.borland.com>
References: <3b3cee8f$1_2@dnews> <3b3da103_1@dnews> <3b3e0880$1_2@dnews>
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 993943343 209.92.40.60 (30 Jun 2001 16:22:23 -0700)
Lines: 31
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews