Event handler for delete child component in AEM/CQ

[亡魂溺海] 提交于 2019-12-11 02:45:13

问题


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>

来源:https://stackoverflow.com/questions/25079427/event-handler-for-delete-child-component-in-aem-cq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!