Touch ui event listener issue | Community
Skip to main content
Level 3
Apr 2, 2018 6:13 PM UTC
Solved

Touch ui event listener issue

I am facing one issue in AEm 6.1 touch ui with event listener. When I open the dialog first time after page refresh  my code inside $(document).on("dialog-ready") or  $(document).on("foundation-contentloaded") doesnt get executed

If I open second time with out page refresh I see it goes inside those functions

I am using extraclientlibs on dialog to invoke

extraClientlibs="[mycategory.for.eventlistener]"

is there any issue with this in AEM 6.1

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
kautuk_sahni
kautuk_sahniAccepted solution
Employee
Apr 3, 2018 8:23 AM UTC

why don't you use Jquery Validator plugin for Touch UI Validation: Validation — Granite UI 1.0 documentation

For standard events, you can use the approach mentioned in this article:- Adobe Experience Manager Help | Using Event Handlers in Adobe Experience Manager Touch UI Components

PS: Jquery Validator is deprecated now (AEM 6.3), now Foundation validation framework is recommended foundation-validation — Granite UI 1.0 documentation  .

-Kautuk

Kautuk Sahni

2 replies

Level 3
Apr 3, 2018 3:18 PM UTC

jquery validator is deprecated, may not be used in future.

It seems that there is an issue with AEM loading dialog-ready function using extraClientlibs attribute in AEM 6.1,

it doesn't load first time

I resolved by creating a generic function which loads when script is called

Only issue with this fix is it calls my function multiple times

1. during page load

2. during dialog open

3. during dialog-ready

Translate
kautuk_sahni
kautuk_sahniAccepted solution
Employee
Apr 3, 2018 8:23 AM UTC

why don't you use Jquery Validator plugin for Touch UI Validation: Validation — Granite UI 1.0 documentation

For standard events, you can use the approach mentioned in this article:- Adobe Experience Manager Help | Using Event Handlers in Adobe Experience Manager Touch UI Components

PS: Jquery Validator is deprecated now (AEM 6.3), now Foundation validation framework is recommended foundation-validation — Granite UI 1.0 documentation  .

-Kautuk

Translate
Kautuk Sahni