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
Solved! Go to Solution.
Views
Replies
Total Likes
Chandra,
In your scenario 2 you don't create this component in the page's parsys, so the include will fail. Why do you want to create the component when it's included? Why do you want to include it at all if it's not present?
Jörg
Views
Replies
Total Likes
Chandra,
In your scenario 2 you don't create this component in the page's parsys, so the include will fail. Why do you want to create the component when it's included? Why do you want to include it at all if it's not present?
Jörg
Views
Replies
Total Likes
In Scenario 2, child component is included in the parent component (baked in page template itself), condition based include is different than non-condition based include of the component .
so what happen when page load gets completed and based on edit dialog configuration on parent component by author, condition meets criteria and child component is displayed but same time if you check JCR, that child node has not been created , it only gets created when you open child node dialog and click on save.
Views
Replies
Total Likes