How to add button on a cq:dialog | Community
Skip to main content
Level 3
March 20, 2017
Solved

How to add button on a cq:dialog

  • March 20, 2017
  • 2 replies
  • 6175 views

Hi All,

I have a requirement where i have to add a button to cq:dialog . On click of that button i need to send current page URL to the servlet.

Please do let me know how i can achieve this in AEM touch UI dialog.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

smacdonald2008
Level 10
March 20, 2017

You can use this Granite data type: 

https://docs.adobe.com/docs/en/cq/5-6-1/touch-ui/granite-reference.html#Button

ALso - in the Touch UI component dialog - you can create a custom sling:resourceType that is basically a JQuery plug-in. This lets you add any field that is not available out of the box and then introduce custom logic.In this use case - you can use JQuery and AJAX. 

See this article to learn how ot develop a custom sling.resourceType:

http://scottsdigitalcommunity.blogspot.com/2017/02/creating-custom-experience-manager.html

Hope this helps.