loading clientlib for dialog

Avatar

Avatar
Applaud 25
Level 2
Shaheena_Sheikh
Level 2

Likes

2 likes

Total Posts

97 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

97 posts

Correct reply

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

15-03-2021

I have a clientlib with 3-4 js files in it in a component. I wanted 1 of those JS files to load for my dialog. I cant use extraClientlibs because that way all the JS will load for my dialog, whereas I specifically want only 1 particular file to load for my dialog. Is there a way to do this?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Level 4
Rohit_Utreja
Level 4

Likes

44 likes

Total Posts

45 posts

Correct reply

15 solutions
Top badges earned
Establish
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Establish
Level 4
Rohit_Utreja
Level 4

Likes

44 likes

Total Posts

45 posts

Correct reply

15 solutions
Top badges earned
Establish
Give Back 3
Give Back
Boost 5
Boost 3
View profile
Rohit_Utreja
Level 4

15-03-2021

@Shaheena_Sheikh ,

 

You can create a new clientlib and include that specific JS file in this new clientlib.

This new clientlib can be loaded while editing component through dialog and you can provide a category name for this clientlib as "cq.authoring.dialog".

 

If you want to be more specific while loading the js file for dialog validation. Please refer to below link for the same.

 

https://blogs.perficient.com/2017/11/06/aem-touch-ui-dialog-validation-new-best-practice-use-foundat...

 

 

 

Answers (3)

Answers (3)

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,049 posts

Correct reply

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

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,049 posts

Correct reply

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

15-03-2021

I agree with @Bhuwan_B  and @Rohit_Utreja , your best bet here is to create a clientLib specific for your component dialog including those JS which you need and then loading it to the dialog via extraClientLibs .

 

Thanks

Veena ✌

Avatar

Avatar
Validate 1
Level 6
Bhuwan_B
Level 6

Likes

133 likes

Total Posts

127 posts

Correct reply

50 solutions
Top badges earned
Validate 1
Affirm 50
Give Back 5
Boost 100
Give Back 3
View profile

Avatar
Validate 1
Level 6
Bhuwan_B
Level 6

Likes

133 likes

Total Posts

127 posts

Correct reply

50 solutions
Top badges earned
Validate 1
Affirm 50
Give Back 5
Boost 100
Give Back 3
View profile
Bhuwan_B
Level 6

15-03-2021

Create a new Client Library Folder with required Js file and add it to your dialog via extraClientlibs property.

https://wcmaem.blogspot.com/2016/08/how-to-load-touchui-dialog-specific.html

 

 

Avatar

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

275 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

275 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

15-03-2021

@Shaheena_Sheikh 

Add the specific file with path in dialog clientlib js.txt