Using a listeners node on a dialog when authoring in Touch UI | Community
Skip to main content
Level 3
October 16, 2015
Solved

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

  • October 16, 2015
  • 1 reply
  • 752 views

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?

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 Lokesh_Shivalingaiah

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

1 reply

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
October 16, 2015

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