Expand my Community achievements bar.

Printing Client Library using HtmlLibraryManager

Avatar

Level 3

Hi ,

I am using HtmlLibraryManager to print my client libraries .

I am using the following code to print the client libraries in the page.

HtmlLibraryManager m = getService(slingRequest);

String st="clientlibrarycategory"

m.writeJsInclude(slingRequest, this.getJspContext().getOut(), st);

the above successfully prints the following :

  
   <script type="text/javascript" src="/etc/designs/clientlibrarycategory/clientlibs.min.js"></script>

But I didn't get why the dependencies, and embeds didn't get printed ? Doesn't it support ,please reply.

Thanks,

Pallavi

1 Reply

Avatar

Administrator

Please have a look at this reference implementation:- aem-clientlib-async/ClientLibUseObject.java at master · nateyolles/aem-clientlib-async · GitHub

Also, refere to this post

~kautuk



Kautuk Sahni