Hi All,
I am trying to load a clientlibs JS when I am creating a new page but it does not work.
What I did:
- Create a person component under /apps/mysample/components/structure/person
- Create a clientlib and dialog for this newly created component
- For clientlib, add new property categories="[person.dialog]"
- For dialog, add new property extraClientlibs ="[person.dialog]"
- Under clientlibs, create js.txt and myscript.js notes
- Modify js.txt and add myscript.js
- Modify myscript.js and add an alert msg in it.
You can check my Example here: Dropbox - MySample.zip

Now when i create a new page, i do not see the alert msg. but after i create it and when i want to modify properties, this alert will fire.
This can be solved if:
- Change category property of clientlib to person.createpagewizard
- Change extraClientlibs property of dialog to person.createpagewizard
- Modify /libs/wcm/core/content/sites/createpagewizard/jcr:content/head/clientlibs and add person.createpagewizard to categories property
But as we know we should not modify nodes under /libs. So what should I do?