cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: [RT] Sitemap Listeners
Date Fri, 15 Apr 2005 14:39:03 GMT
Carsten Ziegeler wrote:
> I while ago we briefly discussed the idea of sitemap listeners that are
> invoked each time a sitemap is entered/left.
> 
> Our 2.2 code base contains a first implementation which can be seen as a
> very simple base for this feature. I think it's time now to discuss this
> further.
> 
> 1. Configuration
> 
> You can define listeners in the map:components section in a sitemap with:
> <map:listeners>
>   <map:listener role="Some Avalon role"/>
>   <map:listener class="A class"/>
> </map:listeners>
> 
> So you can either use a configured component or define a class and then
> an instance of this class is created (using the per sitemap
> classloader). In both cases the listener must be thread safe.
> 
> 2. Listeners and Events
> 
> Currently there are two listener types defined (in o.a.c.sitemap):
> 
> public interface EnterSitemapEventListener extends SitemapListener {
> 
>     void enteredSitemap(EnterSitemapEvent event);
> }
> public interface LeaveSitemapEventListener extends SitemapListener {
> 
>     void leftSitemap(LeaveSitemapEvent event);
> }
is left sitemap fired after the request has been processed? I mean can I 
implement open session in view pattern using your listener?

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Mime
View raw message