When developing an Adobe Experience Manager (AEM) Touch UI components, handling events is an important task. In AEM 6, the Touch UI APIs do not have event handler methods. For information about the AEM Touch UI APIs, see Granite UI documentation.
As a result, to handle events, use DOM supported events. You can use JQuery to handle events. For example, the following code represents the event handler that is invoked when the Touch UI dialog is opened:
$document.on("dialog-ready", function() {
$(window).adaptTo("foundation-ui").alert("Open", "Dialog now open, event [dialog-ready]");
});
This event handler produces an alert message box that appears when the Touch UI dialog is opened, as shown in the following illustration.
This development article discusses how to create a Touch UI component that uses event handlers.
To read this development article, click https://helpx.adobe.com/experience-manager/using/creating-touchui-events.html.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.