Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Using a listeners node on a dialog when authoring in Touch UI

Avatar

Level 4

I have some dialogs that include event listeners, like

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="cq:Dialog" width="800" xtype="dialog"> <items jcr:primaryType="cq:TabPanel"> <items jcr:primaryType="cq:WidgetCollection"> ... </items> </items> <listeners jcr:primaryType="nt:unstructured" beforeshow="function(thisDialog){console.log(thisDialog);}" beforesubmit="function(thisDialog){console.log(thisDialog);}"/> </jcr:root>

These events do not seem to be firing if I author in TouchUI. However, if I put the listener on, say, a textfield widget instead, those events do fire. Is this expected? Is there a way to use dialog level listeners?

1 Accepted Solution

Avatar

Correct answer by
Level 10

listeners works for the node type cq:widget and not for cq:Dialog or any other

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

listeners works for the node type cq:widget and not for cq:Dialog or any other