On Sat, Jun 14, 2014 at 12:01 AM, Paul Libbrecht <[email protected]> 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 META-INF/components.txt
Sure, that's done, couldn't get Utils.getComponent to work otherwise.
like explained somewhere: http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module#HCompo... (and in the Notifications Tutorial, too, I now see after careful reading ...)
some things to try if it still does not work: - check if there are no error messages in the log file on startup - maybe try "extend AbstractEventListener" instead of "implement EventListener" (that should *not* fix any problems, but maybe it gives an explicit error message instead of failing)
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 not listen to AttachmentAddedEvent ? AttachmentUpdatedEvent only refers to already existing attachment updated with a new version.
However, how can I know if the difference is in an attachment? RCS?
thanks in advance.
Paul _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne