Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Is "listeners" documented anywhere?

Avatar

Level 7

In particular, while at the moment I can define a listener like this:

<linkDialogConfig>
  <listeners
    jcr:primaryType="nt:unstructured"
    show="function() { MyNamespace.myChangeListener(); }"/>

I cannot define it like this:

<linkDialogConfig>
  <listeners
    jcr:primaryType="nt:unstructured"
    show="MyNamespace.myChangeListener"/>

Is there a way to just pass the function literal rather than having to wrap it inside a function() { } expression?

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

Going back to your original question, you must use a function() {} expression.

Regards,

Justin

View solution in original post

4 Replies

Avatar

Employee

Avatar

Correct answer by
Employee

Hi,

Going back to your original question, you must use a function() {} expression.

Regards,

Justin

Avatar

Level 7

That is not the same listeners node.

I am referring to dialog.xml listeners for Rich Text Editor's linkDialogConfig, e.g.

<linkDialogConfig jcr:primaryType="nt:unstructured" height="{Long}123" x="{Long}123" y="{Long}123"> <listeners jcr:primaryType="nt:unstructured" show="function() { ... }"/>

Thanks.

Avatar

Level 10

All information including supported events for the Rich Text Editor can be found here:

http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.form.RichText