Thanks very much for those! I hadn't realised they were what I was looking for (I had found the tile post processing one before, but not the other one). I went away from the event listener and worked on a few other bits I had to get done. I will go give them another read now. Just to make sure I am understanding this all correctly, and apologises for these probably basic questions, I am assuming that to use the event listener I am going to need a scheduler (like the IRC bot demo code) so that it starts up automatically. I am also assuming I don't need to do anything to the page in question to trigger the event listener (other than save it!). Thanks again. On 12 January 2013 09:18, Marius Dumitru Florea [via XWiki] < [email protected]> wrote:
On Fri, Jan 11, 2013 at 4:13 PM, Xwiki_beginner <[hidden email]<http://user/SendEmail.jtp?type=node&node=7583266&i=0>> wrote:
Hello, I am pretty new to Xwiki and Groovy/Velocity, but made a bit of progress in what I want to do with it. however I can't find the information I need to move onto the last step so i can start using it.
I have a page which includes an object, which has a static list of states. Upon saving the page I want to update that object to a different state.
I have gone through the tutorial of the creating an event listener in Groovy, and have a basic event listener at the moment. what I am not quite understanding is how I can use that event listener to access the static list and change it to another state upon saving.
I couldn't really find any documentation about what I am trying to do, but
Have you seen http://extensions.xwiki.org/xwiki/bin/view/Extension/Title+Post+Processing+U... or http://extensions.xwiki.org/xwiki/bin/view/Extension/Create+Object+with+Cont... ? It's a good thing to search for code snippets on http://extensions.xwiki.org .
Hope this helps, Marius
please point me in the right direction if I am wrong! I am assuming I will need to do some extra code as by changing the variable, I will need to save the document again.
Thanks very much in advance.
-- View this message in context: http://xwiki.475771.n2.nabble.com/Using-an-event-Listener-to-modify-object-v... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [hidden email] <http://user/SendEmail.jtp?type=node&node=7583266&i=1> http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [hidden email] <http://user/SendEmail.jtp?type=node&node=7583266&i=2> http://lists.xwiki.org/mailman/listinfo/devs
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://xwiki.475771.n2.nabble.com/Using-an-event-Listener-to-modify-object-v... To unsubscribe from Using an event Listener to modify object variables, click here<http://xwiki.475771.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7583258&code=Y3JvbnZla0BnbWFpbC5jb218NzU4MzI1OHwtMTc1Mzg3MzY5OQ==> . NAML<http://xwiki.475771.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
-- Liz Mackie www.cronvek.com -- View this message in context: http://xwiki.475771.n2.nabble.com/Using-an-event-Listener-to-modify-object-v... Sent from the XWiki- Dev mailing list archive at Nabble.com.