RE: Barracuda: Multiple Event Listeners?
"Christian Cryder" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Kirk, By default, DefaultBaseEventListener sets handled to be true automatically (since this is what you'd normally wnat to do, 9 times out of 10). You can either override the isHandled method to return false, -OR- you can modify the listener factory to set notifyAlways = true (saying 'I want this listener to ALWAYS be notified, even if the event is already marked as handled). Which approach is proper really depends on what you're doing when you handle SuccessfulLogin.event - generally, isHandled should ONLY be set to true by a listener that actually generates a response to the browser. notifyAlways is used more for logging type situations where you want to be notified EVEN IF a response has already been sent to the client. That help? Christian ---------------------------------------------- Christian Cryder [[email protected]] Internet Architect, ATMReports.com Barracuda - http://barracuda.enhydra.org ---------------------------------------------- "Coffee? I could quit anytime, just not today" > -----Original Message----- > From: [email protected] [mailto:[email protected]]On > Behalf Of Kirk Daries > Sent: Monday, January 13, 2003 7:59 AM > To: [email protected] > Subject: RE: Barracuda: Multiple Event Listeners? > > > Nope, > > I've never used the 'setHandled' method before within any of my listeners. > > Remember.... both listeners are on the same 'level' and > wait for the 'SuccessfulLogin' event. > > KD > > -----Original Message----- > From: Diez B. Roggisch [mailto:[email protected]] > Sent: 13/January/2003 04:31 > To: [email protected] > Subject: Re: Barracuda: Multiple Event Listeners? > > > >>>Skipping notification because event is already handled > >>>Handled:true > >> > > > > Urrrm.....How do I ensure.. that both listeners are processed? > > Do you set the event.setHandled() to true in your first handler? > > I always do that, because its copy-and-paste code ;) > > Diez > > > _______________________________________________ > Barracuda mailing list > [email protected] > http://www.enhydra.org/mailman/listinfo.cgi/barracuda > FAQ - http://www.jguru.com/faq/Barracuda > _______________________________________________ > Barracuda mailing list > [email protected] > http://www.enhydra.org/mailman/listinfo.cgi/barracuda > FAQ - http://www.jguru.com/faq/Barracuda _______________________________________________ Barracuda mailing list [email protected] http://www.enhydra.org/mailman/listinfo.cgi/barracuda FAQ - http://www.jguru.com/faq/Barracuda