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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

could you please explain what is extraClientlibs ?

Vijaya_Immadise
Level 4
Level 4

Hi 

To load cq.authoring.dialog specific to our dialog, I have seen a property extraClientLibs needs to be used. But I am not able to understand how to use it.

Could anyone please explain the purpose, use and value to be given for this property extraClientLibs property.

 

Thank you

Best Regards,

Vijaya

1 Accepted Solution
kautuk_sahni
Correct answer by
Community Manager
Community Manager

Hi 

As mentioned by Scott, please have a look at this documentation :- https://docs.adobe.com/docs/en/aem/6-2/develop/components/components-touch-optimized.html

// see below snippet 

cq: dialog: {
 jcr: primaryType: "nt:unstructured",
 jcr: title: "Page",
 extraClientlibs: ["category1","category2"],
 mode: "edit",
 sling: resourceType: "cq/gui/components/authoring/dialog"
}

To have your client library loaded solely for your component dialog (i.e. it will not be loaded for another component) you need to set the property extraClientLibs of your dialog to the category name of the client library you have just created. This is advisable if your client library is quite big and/or your field is specific to that dialog and will not be needed in other dialogs. To have your client library loaded for all dialogs, set the category property of your client library to cq.authoring.dialog. 

I hope this would help you.

~kautuk

View solution in original post

3 Replies
kautuk_sahni
Correct answer by
Community Manager
Community Manager

Hi 

As mentioned by Scott, please have a look at this documentation :- https://docs.adobe.com/docs/en/aem/6-2/develop/components/components-touch-optimized.html

// see below snippet 

cq: dialog: {
 jcr: primaryType: "nt:unstructured",
 jcr: title: "Page",
 extraClientlibs: ["category1","category2"],
 mode: "edit",
 sling: resourceType: "cq/gui/components/authoring/dialog"
}

To have your client library loaded solely for your component dialog (i.e. it will not be loaded for another component) you need to set the property extraClientLibs of your dialog to the category name of the client library you have just created. This is advisable if your client library is quite big and/or your field is specific to that dialog and will not be needed in other dialogs. To have your client library loaded for all dialogs, set the category property of your client library to cq.authoring.dialog. 

I hope this would help you.

~kautuk

View solution in original post

vijiyakuymarm43
Level 1
Level 1

// extraClientlibs property behavior issue.

I have two component. Let say component1 added with extraClientLibs clientlibs1 and component2 added with extraClientLibs clientlibs2.

Now in the same page add component1 and component2.

1. Edit component1 -> only clientlibs1 is loaded

2. Edit component2 -> Both clientlibs1 & clientlibs2 loaded [Without refreshing the page open the component2 after the compoent one]