On Thu, Apr 26, 2012 at 10:00 PM, Eugen Colesnicov <[email protected]> wrote:
Marius Dumitru Florea wrote
Hi Moritz,
(1) Use the observation module. You can write an event listener that is called each time a new document is created. See http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotificationTutorial for a tutorial on how to do this, and http://extensions.xwiki.org/xwiki/bin/view/Extension/Title+Post+Processing+U... as a simple example.
In a realty existing very big problem with this method. I should manually start event listener every time after restarting application server ... In a
You can of course write the listener in Java (it's a component) and drop the jar in WEB-INF/lib. You won't have to manually register the listener in this case.
theory is possible to write a job in a scheduler, which will restart event listener every 10 minutes - I tried - but without success. In any case - it is a terrible solution - same as "patching patch" ...
With http://dev.xwiki.org/xwiki/bin/view/Design/WikiComponents hopefully you'll be able to implement event listeners (which are components) and they will be detected automatically, even after restart, by the WikiComponentManager. Hope this helps, Marius
As a result - XWiki haven't easy and transparent possibility to "attach" additional actions to some internal actions (create, save, delete, etc). Methods exists, but all have some big minuses.
-- Best regards Eugen Colesnicov
-- View this message in context: http://xwiki.475771.n2.nabble.com/Automatic-subpage-creation-for-application... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users