RE: Re: DefaultDispatchQueue implementation problem

"Christian Cryder" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi Thorsten,

Have you considered using

  Object sourceEvent = context.getEvent().getRootEvent();

This will tell you what the original event was that the user entered in the
browser...

Christian
----------------------------------------------
Christian Cryder
Internet Architect, ATMReports.com
Project Chair, BarracudaMVC - http://barracudamvc.org
----------------------------------------------
"Coffee? I could quit anytime, just not today"


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Thorsten Möller
> Sent: Monday, September 29, 2003 11:12 AM
> To: [email protected]
> Subject: [Barracuda] Re: DefaultDispatchQueue implementation problem
>
>
> Christian Cryder <[email protected]> wrote:
>
> > It _sounded like_ you are trying to figure out whether the event was
> > invoked directly, or whether a child event was actually fired.
> Exact. It's an event which normaly should never directly called.
> Here is an
> excerpt from my events.xml on which I want to explain it:
>
>
> <req-events>
> <event name="CheckMaintenance">
>     <event name="CheckLocale">
>         <event name="MainPage"/>
>         ...
>     </event>
> </event>
> ...
>
> The handler for events CheckMaintenance and CheckLocale are
> something like a
> filter which normally not produce a view event (only the CheckMaintenance
> will fire an event in case of backend maintenance to forward to an error
> page). Nevertheless it is possible to call the events through the browser
> directly. In this (unwanted but unavoidable) situation I want to make sure
> that something like a default view event will be produced, otherwise an
> exception is thrown. To test wheter the event was directly called
> I thought
> I can use the method listRemainingEvents() but the result was always an
> empty list.
>
> In the meantime there is another question: How to remove remaining events
> from the queue that is clean the queue? I need this to remove all events
> from the queue when there are calls on child events of
> CheckMaintenance but
> the backend is on maintenance and I want to prevent that child events will
> handled too.
>
> Thorsten
>
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.