Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
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
Gelöst! Gehe zu Lösung.
Zugriffe
Antworten
Likes gesamt
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
Zugriffe
Antworten
Likes gesamt
It should work. Refer [1] if it helps
[1] https://docs.adobe.com/docs/en/cq/5-5/developing/components/edit_config.html
Zugriffe
Antworten
Likes gesamt
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.
Zugriffe
Antworten
Likes gesamt
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
});
Zugriffe
Antworten
Likes gesamt
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.
Zugriffe
Antworten
Likes gesamt
I will look into this and see if I can reproduce this issue. I will post back my findings.
Zugriffe
Antworten
Likes gesamt
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.
Zugriffe
Antworten
Likes gesamt
Hi,
use beforesubmit listener on dialog, it's easy and works properly in 5.5
Zugriffe
Antworten
Likes gesamt
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
Zugriffe
Antworten
Likes gesamt
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.
Zugriffe
Antworten
Likes gesamt
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten