Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

AEM EventListener

Avatar

Level 2

Hi ,

 

I have registered my Event Listener for "nt:unstructured" node type and listening to the events of type Event.PROPERTY_ADDED | Event.PROPERTY_CHANGED. Is there any way to restrict the generation of events for certain properties.

I want the events to trigger only when certain properties are added and jcr:lastModified is changed.

 

Thanks in advance

 

Nitesh Gupta

1 Reply

Avatar

Level 9

Nitesh,

this is the problem with event listener. You can't control in a way that it gets fired in on property modification and does not fire in another. if event is register with modification, it fires for all. 

However, in the event listener, through EVENT object, you can determine and put the condition. that should work. let me know if you still need some more clarification.

Nitesh Gupta wrote...

Hi ,

I have registered my Event Listener for "nt:unstructured" node type and listening to the events of type Event.PROPERTY_ADDED | Event.PROPERTY_CHANGED. Is there any way to restrict the generation of events for certain properties.

I want the events to trigger only when certain properties are added and jcr:lastModified is changed.

Thanks in advance

Nitesh Gupta