Thursday, 7 May 2015

Using Event Handlers in Adobe Experience Manager Touch UI Components

When developing 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

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.



No comments:

Post a Comment