On Fri, May 30, 2014 at 9:32 AM, vincent(a)massol.net <vincent(a)massol.net> wrote:
On 30 May 2014 at 07:39:44, Marius Dumitru Florea
(mariusdumitru.florea@xwiki.com(mailto:mariusdumitru.florea@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 used on multiple requests. I updated the
LoggingEventListener.
Thanks but I think it’s better to get it from the
passed “data” parameters which represents the XWikiContext.
I didn't say otherwise :) , even if you get it from the passed "data"
or from the execution context you should still not keep a reference to
the XWiki context between events.
Also
http://platform.xwiki.org/xwiki/bin/download/DevGuide/WritingEventListenerT…
needs to be updated too.
Thanks
-Vincent
Thanks,
Marius
On Thu, May 29, 2014 at 7:39 PM, vincent(a)massol.net wrote:
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/WritingEventListenerTutor…
You’ll learn for example:
- Adding content to pages on save
- Log when a document is modified
- Send a mail whenever a comment is added
Enjoy!
Thanks
-Vincent
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users