Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Clientlib issue

Avatar

Avatar
Applaud 25
Level 2
Shaheena_Sheikh
Level 2

Likes

2 likes

Total Posts

96 posts

Correct Reply

1 solution
Top badges earned
Applaud 25
Applaud 5
Affirm 1
Validate 10
Validate 1
View profile

Avatar
Applaud 25
Level 2
Shaheena_Sheikh
Level 2

Likes

2 likes

Total Posts

96 posts

Correct Reply

1 solution
Top badges earned
Applaud 25
Applaud 5
Affirm 1
Validate 10
Validate 1
View profile
Shaheena_Sheikh
Level 2

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)

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

274 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

274 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Anudeep_Garnepudi
MVP

25-01-2021

@Shaheena_Sheikh 

If clientlib xyz contains Dialog related js/css then use includeclientlibs.

  1. You won't be able to see this clientlib being loaded on editor page unless until you open the dialog at least once.
  2. Very specific to editor mode

If clientlib xyz contain rendering related js/css then include it in template or component.

  1. You will not see this clientlib loading on editor page directly, because the page will be loaded in iframe.
  2. clientlib xyz will not interact with editor page, as it loads in iframe

Answers (2)

Answers (2)

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

471 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

471 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

26-01-2021

@Shaheena_Sheikh What I understood from your requirement is that , you have to load some JS specifically for authoring dialog alone. If that is the case I think the best way to do so is to use the extraClientLibs property in the dialog node

 

Check this https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/could-you-please-explain-w...

 

Thanks

Veena ✌

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

627 likes

Total Posts

596 posts

Correct Reply

234 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

627 likes

Total Posts

596 posts

Correct Reply

234 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
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...