A custom parent component 's JSP has include statement like this (parentXXX)
<c:if test="${someThing== true}">
<sling:include path="childXXXNode" resourceType="apps/xxx/components/childXXX" />
</c:if>
Two scenario.
1. if i drag and drop childXXX on the CQ page parsys area, immediately childXXXNode node would be created under /content/site/page/par/childXXXNode.. that's fine
2.if i include childXXX as stated above in JSP code , then if i go to edit dialog for the child component ,CQ5 throws 404 for childXXXNode.infinity.json since that path has not been created yet but once you save edit dialog , node gets created and then next time CQ5 never throws 404 because JCR Path for child component has been created under page/par/parentXXX node under content..
Now question is : How can we create JCR node for child component under page/par/parentXXX/ as soon as include statement gets executed very first time?
Thanks Chandra