I have an event listener as described here: http://extensions.xwiki.org/xwiki/bin/view/Extension/Title+Post+Processing+Using+Groovy
Now I need to Register it automaticaly. I already read in this context previous discusions and jira-issue: http://jira.xwiki.org/browse/XWIKI-4936 http://xwiki.475771.n2.nabble.com/Registering-an-event-listener-automatically-td4626649.html As a result - I understand that for now don't exist easy method to did it. But one of the possible temporary solution for now: - write an Scheduler job, which will start every 5 minutes, check if listener already registered, and if not - register it. According to this, I trying to write such Scheduler job, but I have some troubles ... Maybe somebody can help me. I trying like this: groovyObject = xwiki.parseGroovyFromPage("MySpace.MyPage") groovyObject.setObjects(xwiki, context) print(groovyObject.TitleUpdater()) but I get an error: ... Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script1331756758851315922078.groovy: 1: Ambiguous expression could be either a parameterless closure expression or an isolated open code block; solution: Add an explicit closure parameter list, e.g. {it -> ...}, or force it to be treated as an open block by giving it a label, e.g. L:{...} @ line 1, column 1. ... When I try to find which line give me this error, I found that my first line (groovyObject = xwiki.parseGroovyFromPage("MySpace.MyPage") give me this error. I don't understand why - space name and page name are correct ... Can somebody help me? Thanks beforehand! Eugen Colesnicov -- View this message in context: http://xwiki.475771.n2.nabble.com/Register-an-EventListener-by-Scheduler-job-tp7373335p7373335.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users