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.
Here is an older community article written by one of our Touch UI experts that can help you with this -- http://experience-aem.blogspot.com/2015/04/aem-6-sp2-touchui-adding-dynamic-select-options.html
Views
Replies
Total Likes
However - the Granite Resource types by default do not support an event model that you can use to develop listeners.
Views
Replies
Total Likes
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?
Thanks,
Jörg
Views
Replies
Total Likes
Joerg - i believe this community member means an event model for Granite Resource types
Views
Replies
Total Likes
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
#base=js
ccdtopicpage.js
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 ()
{
//doSomething
});
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.
Views
Replies
Total Likes