Hi,
I am trying to implement custom function to component's cq:listeners. I simply set the value of afteredit property to: function(){alert "something";}, but js didn't get worked when editing the custom component. Is it a bug of cq5.5?
Thanks and Regards,
Yy
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
I have even tried Link: https://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html
Its working fine for me too.
And Supporting to the fact "For your example - afteredit is a way to fire an event by defining a JCR node. Its better to define an event with code using events defined in the AEM widgets API:
http://docs.adobe.com/content/docs/en/cq/5-6-1/widgets-api/index.html"
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
It should work. Refer [1] if it helps
[1] https://docs.adobe.com/docs/en/cq/5-5/developing/components/edit_config.html
Views
Replies
Total Likes
I tried, but even REFRESH_PAGE didn't refresh the page. No matter what value I set for the actions (afteredit, afterinsert, etc), they always work like REFRESH_SELF.
Views
Replies
Total Likes
Are you using script to define the event handlers, as shown here:
https://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html
//DROP DOWN
this
.linkType =
new
CQ.form.Selection({
type:
"select"
,
cls:
"customwidget-1"
,
listeners: {
selectionchanged: {
scope:
this
,
fn:
this
.updateHidden
}
},
optionsProvider:
this
.optionsProvider
});
Views
Replies
Total Likes
I do use the sample in https://helpx.adobe.com/experience-manager/using/creating-aem-multifield-components.html to create custom components but I didn't use the way like scripts in that sample to deal with even listeners. I set cq:listeners "afteredit" value to the scripts which can do some stuff. The problem is those scripts didn't get fired.
Views
Replies
Total Likes
I will look into this and see if I can reproduce this issue. I will post back my findings.
Views
Replies
Total Likes
Events in 5.5 are firing. I have just tested and this was result:
As you can see - this fires when i select a drop-down item. The value is copied and placed into the text field.
For your example - afteredit is a way to fire an event by defining a JCR node. Its better to define an event with code using events defined in the AEM widgets API:
http://docs.adobe.com/content/docs/en/cq/5-6-1/widgets-api/index.html
If you define event handler via a JCR node - i have found that events handlers defined in a JS script on a valid AEM widget works better.
Views
Replies
Total Likes
Hi,
use beforesubmit listener on dialog, it's easy and works properly in 5.5
Views
Replies
Total Likes
Hi
I have even tried Link: https://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html
Its working fine for me too.
And Supporting to the fact "For your example - afteredit is a way to fire an event by defining a JCR node. Its better to define an event with code using events defined in the AEM widgets API:
http://docs.adobe.com/content/docs/en/cq/5-6-1/widgets-api/index.html"
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Yes, it works in the sample. The problem should be in my project which didn't have event listeners fired. Thank you very much for the help.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies