I also tried
WikiEventManager.addWikiEventListener(org.apache.wiki.ui.WikiServletFilter.class,
new WikiEventListener() {
...
but that doesn't get called, either. Does anyone know how that is supposed
to work?
If I understand https://jspwiki-wiki.apache.org/Wiki.jsp?page=WikiEvent
correctly, that might need to be done BEFORE WikiServletFilter in
instantiated, but I don't see how that is possible. But then, I'm not sure
how accurate that page is - some of the other pages describing event
handling some out of date.
Thanks,
Ulf
On Tue, Nov 21, 2023 at 11:10 AM Ulf Dittmer <[email protected]>
wrote:
> Hi-
>
> I'm trying to get notified whenever a page is delivered by listening to
> WikiPageEvent.PAGE_DELIVERED events. To that end I implemented a
> WikiEventListener like this
>
> engine.addWikiEventListener(new WikiEventListener() {
> @Override
> public void actionPerformed (WikiEvent event) {
> log.info(event.toString());
> if (event instanceof WikiPageEvent) {
> ...
> }
> }
> });
> }
>
> But the listener is never called with WikiPageEvents. According to
> https://jspwiki-wiki.apache.org/Wiki.jsp?page=WikiEventUtils (a class
> which apparently no longer exists) I may have to register the listener with
> WikiServletFilter rather than WikiEngine. How would I go about that?
>
> Thanks,
> Ulf
>