Expand my Community achievements bar.

SOLVED

More information on events in Touch UI dialogs

Avatar

Level 4

I'm looking at putting some event handling on a dialog and going through the instructions here: https://helpx.adobe.com/experience-manager/using/creating-touchui-events.html

1) The instructions result in an event that fires on ALL dialogs. Is there an example for setting up an event on a specific dialog?

2) Those instructions reference a "dialog-ready" event. Is there a list of defined events?

1 Accepted Solution

Avatar

Correct answer by
Level 10

There are no specific  events for the Touch UI dialog. You use DOM events to handle Touch UI dialog events - as discussed in the article:

"In AEM 6, the Touch UI APIs do not have event handler methods. As a result, to handle events, use DOM supported events. You can use JQuery to handle events."

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

There are no specific  events for the Touch UI dialog. You use DOM events to handle Touch UI dialog events - as discussed in the article:

"In AEM 6, the Touch UI APIs do not have event handler methods. As a result, to handle events, use DOM supported events. You can use JQuery to handle events."

Avatar

Employee Advisor

You can add a condition block to check for dialog source property in the event handler and write your logic inside the condition block. Example code - 

var config = Granite.author.DialogFrame.currentDialog.getConfig(); if (config.src == "<Your dialog path>") { }

Avatar

Level 4

Where does "dialog-ready" come from, though? I don't see it here: https://developer.mozilla.org/en-US/docs/Web/Events and all the references I find to it online are specific to AEM.