AEM EventListener | Community
Skip to main content
niteshg35735790
Level 2
May 4, 2017
Question

AEM EventListener

  • May 4, 2017
  • 1 reply
  • 1156 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Jitendra_S_Toma
Level 10
May 4, 2017

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