Hi All,
I am trying to include the componentB into componentA using the data-sly-resource with below syntax in the parent component (Component A)
<div data-sly-resource="${ 'title' @ resourceType='myproject/component/content/title '}"></div>
When I drag the component A, I am able to open the dialog box of component B and it throws an below error only for the first time when we try to open the dialog.
Error during include of component '/apps/myproject/components/content/componentB'
Error Message:
org.apache.sling.api.scripting.ScriptEvaluationException:
Processing Info:
I suspect because the node for componentB has not created under jcr:content of page path ,It is created once we open the dialog and add some configuration, Is there any way I can create the node manually for the component B when the parent component A is dragged on the page.
Thanks in advance,
Solved! Go to Solution.
Views
Replies
Total Likes
Hi All,
Thanks for the response,
The issue is with the child component and able to sort it by modify sightly call in child component
Views
Replies
Total Likes
Hi,
Which version are you using?
I tried in 6.3 I am not getting any error and node is getting created for componentB.
below is my code.
Thanks
Arun
Views
Replies
Total Likes
Hi Arun,
I am using the Aem 6.3 with SP2
Is the cmp node is created as soon as I drag the parent component , without opening the dialog of div-check component ??
Views
Replies
Total Likes
Is your Component A a container component like a Responsive Layout container?
Views
Replies
Total Likes
Hi Girish,
No, cmp node is getting created after opening dialog but I am not getting any error which you've mentioned.
Views
Replies
Total Likes
Hi scott,
It's not a container component.
Views
Replies
Total Likes
Hi Arun,
Is there any way to create the node dynamically when the parent component is dragged.
Views
Replies
Total Likes
Hi,
I am not seeing any error. See the screenshot show.
Thanks,
Ratna Kumar.
Views
Replies
Total Likes
Hi,
Title node is getting created after when you edit the dialog of the included component. See the image below.
Thanks,
Ratna Kumar.
Views
Replies
Total Likes
I am not a big fan of nesting components - unless the parent is a container - like a Grid layout and the child is a component that is suppose to go within the grid - like a card compoennt. For example - the Grid Parent component:
The child card components:
This shows a better practice of parent/child AEM components.
Hi All,
Thanks for the response,
The issue is with the child component and able to sort it by modify sightly call in child component
Views
Replies
Total Likes