Expand my Community achievements bar.

SOLVED

_cq_editConfig.xml: can't use afterinsert event

Avatar

Level 1

Hello! I'm trying to use listeners within a _cq_editConfig.xml file in one of my components. On both of the following cases the afteredit event works just fine, but the afterinsert event doesn't get triggered at all.

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="cq:EditConfig"> <cq:listeners jcr:primaryType="cq:EditListenersConfig" afterinsert="REFRESH_PAGE" afteredit="REFRESH_PAGE" /> </jcr:root>
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="cq:EditConfig"> <cq:listeners jcr:primaryType="cq:EditListenersConfig" afterinsert="function doThis() { console.log('after insert') }" afteredit="function doThat() { console.log('after edit') }" /> </jcr:root>

Setup: AEM 6.0, SP 1

1 Accepted Solution

Avatar

Correct answer by
Employee
1 Reply

Avatar

Correct answer by
Employee