On Fri, 2005-04-15 at 16:07 +0200, 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>
> WDYT?
Maybe this is a stupid question but could this be extended to <map:match
pattern=""/>.
Ok, one could implement it via the implementation of
public interface EnterSitemapEventListener extends SitemapListener {
void enteredSitemap(EnterSitemapEvent event);
}
...but this would lead to extract the requests in the java classes but
IMO that is not an elegant solution.
The idea would be
<map:match pattern="prepare.include.**" listener="viewListener.class">
<map:generate src="cocoon:/prepare.view.{1}"/>
<map:transform src="resources/stylesheets/prepare.include.xsl">
<map:parameter name="config-file" value="{project:skinconf}"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
With
public interface EnterMapEventListener extends MapListener {
void enteredSitemap(EnterSitemapEvent event);
}
WDYT?
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)