As far as I know you don't have to manually add the event listener. It's enough to implement the EventListener interface as a component (using the proper annotations like @Component and @Named). The observation manager looks up all event listener components using the component manager. Hope this helps, Marius On Oct 26, 2013 10:06 PM, "Matthias Wegner" <[email protected]> wrote:
I did't found it in the sources before, because the class is "DocumentUpdatedEvent" and not "DocumentUpdateEvent" (as described in the tutorial). Now it works fine. At the moment i put the new listener to the ObservationManager when one of my components is initialized (Components imlements Initializable). I use here
@Inject ObservationManager observationManager;
@Override public void initialize() throws InitializationException { observationManager.addListener(new MyOwnEventListener()); }
Is there a way to add the new listener in general to the ObersvationManager when Xwiki starts?
Regards, Matthias
-- View this message in context: http://xwiki.475771.n2.nabble.com/Create-Object-by-Default-with-a-new-Page-t... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs