Is "listeners" documented anywhere? | Community
Skip to main content
LinearGradient
Level 6
October 16, 2015
Solved

Is "listeners" documented anywhere?

  • October 16, 2015
  • 4 replies
  • 1324 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by JustinEd3

Hi,

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

Regards,

Justin

4 replies

Community Manager
October 16, 2015
JustinEd3Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Hi,

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

Regards,

Justin

LinearGradient
Level 6
October 16, 2015

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.

smacdonald2008
Level 10
October 16, 2015

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