Clientlib issue

Avatar

Avatar

Shaheena_Sheikh

Avatar

Shaheena_Sheikh

Shaheena_Sheikh

25-01-2021

I have an existing component that has clientlib with category "abc" (suppose). I added a validation for a dialog field and created this clientlib outside the folder of my component and the named the category as "xyz".

I have added xyz in the category as well as the dependency of my component clientlib (abc), but still my js files doesn't load. Whereas, in the dialog of my component if I used 'granite include-clientlib' node and add category xyz in that node, then my js loads.

/apps-->clientlib(xyz)

/apps-->mycomp-->clientlib(abc)

 

View Entire Topic

Avatar

Avatar

BrianKasingli

MVP

Avatar

BrianKasingli

MVP

BrianKasingli
MVP

25-01-2021

@Shaheena_Sheikh,

If you are trying to create a client library for its sole purpose, to add behavior to the Touch UI dialogues, I suggest you create a new client library just for its single responsibility. 

As an example:

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:ClientLibraryFolder"
    allowProxy="{Boolean}true"
    categories="[cq.authoring.editor.hook]"
    dependencies="[cq.authoring.editor.core]"/>

Documentation can be found here, https://experienceleague.adobe.com/docs/experience-manager-64/developing/extending-aem/customizing-p...