List of Events in Touch UI AEM 6.2 | Adobe Higher Education
Skip to main content
Level 2
January 11, 2017
해결됨

List of Events in Touch UI AEM 6.2

  • January 11, 2017
  • 2 답변들
  • 13048 조회

Can someone share the list of events in touch UI for AEM 6.2.Apart from the below events

(function ($, $document) {
    "use strict";

    $document.on("dialog-ready", function() {
        //$(window).adaptTo("foundation-ui").alert("Open", "Dialog now open, event [dialog-ready]");
    });

    $(document).on("click", ".cq-dialog-submit", function (e) {
        //$(window).adaptTo("foundation-ui").alert("Close", "Dialog closed, selector [.cq-dialog-submit]");
    });

    $document.on("dialog-ready", function() {
        document.querySelector('form.cq-dialog').addEventListener('submit', function(){
            //$(window).adaptTo("foundation-ui").alert("Close", "Dialog closed, selector [form.cq-dialog]");
        }, true);
    });

    $document.on("dialog-success", function() {
        //$(window).adaptTo("foundation-ui").alert("Save", "Dialog content saved, event [dialog-success]");
    });

    $document.on("dialog-closed", function() {
        //$(window).adaptTo("foundation-ui").alert("Close", "Dialog closed, event [dialog-closed]");
    });
})($, $(document));

 

TIA

Mahesh

이 주제는 답변이 닫혔습니다.
최고의 답변: kautuk_sahni

You can take indirect help of Touch UI validations.

See this article :- http://www.nateyolles.com/blog/2016/02/aem-touch-ui-custom-validation

// AEM Touch UI Custom Validation

The  selector property ties the validator to the form elements on the page. The property accepts any jQuery selector such as a class ( .my-class-name), type ( INPUT) or attribute ( INPUT[type="text"]) selectors. The  validate property is the function that validates the form element's input. The function provides the form element as a jQuery object as the single available parameter. The field is treated as invalid if this function returns a string literal as the validation error message.

So here in validate function you can perform your actions.

 

Also please have a look at this community article :-

Link:-http://experience-aem.blogspot.com/2015/02/aem-6-sp2-touch-ui-dialog-before-submit.html

And do watch this ask the expert session :-"http://scottsdigitalcommunity.blogspot.ca/2015/04/april-session-of-ask-aem-community.html"

 

I hope this would help you.

~kautuk

2 답변

smacdonald2008
Level 10
January 11, 2017

The Touch UI API  does not have event handler in AEM like the Classic UI has.

See this Ask the AEM community webinar on this subject: 

http://scottsdigitalcommunity.blogspot.ca/2015/04/april-session-of-ask-aem-community.html

kautuk_sahni
Community Manager
Community Manager
January 11, 2017

You can take indirect help of Touch UI validations.

See this article :- http://www.nateyolles.com/blog/2016/02/aem-touch-ui-custom-validation

// AEM Touch UI Custom Validation

The  selector property ties the validator to the form elements on the page. The property accepts any jQuery selector such as a class ( .my-class-name), type ( INPUT) or attribute ( INPUT[type="text"]) selectors. The  validate property is the function that validates the form element's input. The function provides the form element as a jQuery object as the single available parameter. The field is treated as invalid if this function returns a string literal as the validation error message.

So here in validate function you can perform your actions.

 

Also please have a look at this community article :-

Link:-http://experience-aem.blogspot.com/2015/02/aem-6-sp2-touch-ui-dialog-before-submit.html

And do watch this ask the expert session :-"http://scottsdigitalcommunity.blogspot.ca/2015/04/april-session-of-ask-aem-community.html"

 

I hope this would help you.

~kautuk

Kautuk Sahni