Thomas Mortagne wrote
... What this script is doing is to register a java object created with groovy, your velocity will never be called when an event is received.
Basically what happen: * when you view the page: a java listener is created and registered in groovy and your velocity is executed but onEvent is not called * when an event is received: onEvent of previously registred java object is called and nothing else, the script is not executed
So if you need to do something when an event is received you need to do it fully in the onEvent method.
Thanks Thomas! As I understand, I should include all my planned script actions inside groovy script (same as groovy script make changes in a title of source page)... According to this, I have another question. I should include ALL my actions inside this onEvent object? For example, can I have on another page something like macros (like velocity macros) and everytime, when I need (when onEvent is called) - call this macros from onEvent object and execute this? This is can be helpful if I need to repeat (when onEvent received) some actions (for example - change title not only for source page, but for all pages of a some class). If I can - it is possible to call velocity macros, or all like this procedures should be written on groovy? -- Best regards Eugen Colesnicov! -- View this message in context: http://xwiki.475771.n2.nabble.com/Interacting-between-groovy-velocity-script... Sent from the XWiki- Users mailing list archive at Nabble.com.