Converting listeners in AEM 6.4

nileshdchavan 29-06-2018

As per the Adobe release notes, the listeners are not supported in AEM 6.4. Any listeners that needs to be converted to AEM 6.4 from lower versions (5.6) should be handled by creating customer clientlibs.

I'm relatively new to AEM and hence would need help along with example to know how this can be taken care.

In my AEM 5.6 listener, i have a JCR property called selectionChanged which has a value as function which calls a java script function.

Anyone who has implemented this, can you please guide me with the step by step process of handing and implementing similar functionality in AEM 6.4. do we need listener node created under cq:dialog? Which all properties need to be defined.

Thank you in advance.

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (5)

Answers (5)


In Aem 5.6 there was an option to execute listeners in the node itself something like this


To implement this in Aem 6.4 you needto create a clientlib folder and write the code in the javascript.

Create a folder with a name and add a property named as categories and give some category name


Add a folder named as js and another file named as js.txt .In the folder named as js add a file with some name something like shown in the screenshot


In the js.txt add the name of the jsfile something like



Make sure you add the categories name in the cq:dialog node with the property name as extraClientlibs


Now how to write selectionChanged. So basically this refers to the event that when something is changed.

For example a checkbox when the checkbox is checked or unchecked you can write something like

var submitCheckValue = $(".navcheckclass")[0];

if(submitCheckValue.onchange = function ()




where submitCheckValue is the graniteClass name.

And you dont need to add the listeners node in Aem 6.4 .Whatever is there in listener node convert that to javascript and write it under the clientlib folder.

Let me know if you need anything else.


Can you please explain what you mean with "listener"? There are many different types of "listeners" around in the AEM tech stack, so a disambiguation would be really helpfull. When you mention "release notes", can you add the relevant URL?