Marcel Reutegger wrote:
Torgeir Veimo wrote:
I'm registering an event listener like this:
systemSession.getWorkspace().getObservationManager().addEventListener(new
ProtectedNodeListener(systemSession),
(Event.NODE_ADDED | Event.NODE_REMOVED | Event.PROPERTY_ADDED |
Event.PROPERTY_REMOVED | Event.PROPERTY_CHANGED),
"/jcr:root",
what you rather want here is "/" not "/jcr:root" ;)
/jcr:root is only used in context of a document view mapping, such as
document view export or XPath queries.
Thx!
Quick followup question; when i create a node with child nodes, I seem
to be getting only one event with type PROPERTY_ADDED on one of the
children of the new node. Eg I create a node
/pages/test2 of type nen:resource, mixin nen:protected, with childen
nen:ace.
The node I get the event for is the node
/pages/test2/nen:ace/jcr:primaryType
Is there something wrong with my listener registration?
--
-Torgeir