Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-06-17 Thread Paul Libbrecht
I just recopied the CommentEventListener which listens to changed comments, and that worked. So I suspected by use of AttachmentDeletedEvent and AttachmentUpdatedEvent was wrong and I added DocumentUpdatedEvent as one of the types I was interested in. I am nicely receiving them. You did

Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-06-17 Thread Thomas Mortagne
On Tue, Jun 17, 2014 at 10:25 AM, Paul Libbrecht p...@hoplahup.net wrote: I just recopied the CommentEventListener which listens to changed comments, and that worked. So I suspected by use of AttachmentDeletedEvent and AttachmentUpdatedEvent was wrong and I added DocumentUpdatedEvent as one

Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-06-17 Thread Thomas Mortagne
On Tue, Jun 17, 2014 at 11:05 AM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Tue, Jun 17, 2014 at 10:25 AM, Paul Libbrecht p...@hoplahup.net wrote: I just recopied the CommentEventListener which listens to changed comments, and that worked. So I suspected by use of

Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-06-13 Thread Clemens Klein-Robbenhaar
On 06/13/2014 01:18 AM, Paul Libbrecht wrote: Hello Vincent and all, I've been successfully making my first (java-based) component (I can call it from other places) using hints from there and the components' tutorial. However, I have failed to get that component to listen to events.

Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-06-13 Thread Paul Libbrecht
Hello XWiki experts, What else can wrong in my listener? Shouldn't there be listener registration at components? (e.g. in the initialize method) yes, for registration you need to add the class to the META-INF/components.txt Sure, that's done, couldn't get Utils.getComponent to work

Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-06-13 Thread Thomas Mortagne
On Sat, Jun 14, 2014 at 12:01 AM, Paul Libbrecht p...@hoplahup.net wrote: Hello XWiki experts, What else can wrong in my listener? Shouldn't there be listener registration at components? (e.g. in the initialize method) yes, for registration you need to add the class to the

Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-06-12 Thread Paul Libbrecht
Hello Vincent and all, I've been successfully making my first (java-based) component (I can call it from other places) using hints from there and the components' tutorial. However, I have failed to get that component to listen to events. While another, groovy-based, listener is notified, my

Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-05-30 Thread vinc...@massol.net
  On 30 May 2014 at 07:39:44, Marius Dumitru Florea (mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com)) wrote: Event listeners should not keep a reference to the XWiki context from when they were created. XWiki context is created per request while the event listener is

Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-05-30 Thread Marius Dumitru Florea
On Fri, May 30, 2014 at 9:32 AM, vinc...@massol.net vinc...@massol.net wrote: On 30 May 2014 at 07:39:44, Marius Dumitru Florea (mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com)) wrote: Event listeners should not keep a reference to the XWiki context from when they

[xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-05-29 Thread vinc...@massol.net
Dear XWiki users, Since I’ve seen several questions recently on the list related to XWiki events, I’ve spent several hours rewriting the XWiki Notifications Tutorial here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingEventListenerTutorial You’ll learn for example: - Adding content

Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)

2014-05-29 Thread Marius Dumitru Florea
Event listeners should not keep a reference to the XWiki context from when they were created. XWiki context is created per request while the event listener is used on multiple requests. I updated the LoggingEventListener. Thanks, Marius On Thu, May 29, 2014 at 7:39 PM, vinc...@massol.net