could you please explain what is extraClientlibs ?

Avatar

Avatar

Vijaya_Immadise

Avatar

Vijaya_Immadise

Vijaya_Immadise

19-12-2016

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

6.0K

Likes

1.1K

Correct Reply

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

6.0K

Likes

1.1K

Correct Reply

1.1K
kautuk_sahni
Community Manager

20-12-2016

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

Answers (2)

Answers (2)

Avatar

Avatar

vijiyakuymarm43

Avatar

vijiyakuymarm43

vijiyakuymarm43

16-10-2019

// 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]