How can I add an event handler for my Adobe AEM6 component that triggers when a child component is deleted?
There are several listeners that I can attach event handlers to, listed in the documentation for cq:listeners but unfortunately there isn't one for afterchilddelete.
I've tried adding a cq:childEditConfig node to the component but, at least in AEM6, the handler doesn't fire:
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:EditConfig">
<cq:listeners
jcr:primaryType="cq:EditListenersConfig"
afterdelete="mynamespace.afterchilddelete"/>
</jcr:root>