Hi Everyone !
I'm working on AEM SPA approach with react 18 version in that we have a use case to provide background color , background image , id ,attribute etc to the author and pass these values as a json for the react component.
As per the core container functionality , except the above mentioned properties remaining values are passing in the json generated such as the component authored inside the container its respective values etc. And moreover even if are enabling background image and other properties from the component policy level the values are only being stored in node level not coming in json.
So extended the core container model and added the above properties , but after execution of the model I was able to pass those values in json from the nodes generated and all the responses as expected is coming. The major issue happened is with the author side that components authored in the container are not being visible in the author mode , but i can see the inner components response in json.
Mentioning the extended code below
Impl Method
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Verify Resource Type: Make sure that the resource type of your extended container component (aemsampleproject/components/container) matches the resource type used in the template structure. If the resource types do not match, the components authored in the container may not be recognized correctly.
Check Component Policy: Ensure that the component policy for the container component is correctly configured to include the additional properties you have added (backgroundImageReference, backgroundColor, etc.). Verify that the properties are defined in the component policy dialog and that they are correctly mapped to the corresponding fields in the container component.
Check Component Policy Path: Confirm that the component policy path is correctly set for the container component. The component policy path should point to the location where the component policy is stored in the repository. If the path is incorrect, the component policy values may not be applied correctly.
Verify Component Inheritance: If you have extended the core container model, make sure that your extended model is correctly inheriting from the core container model. Check that the CustomContainerImpl class extends the appropriate core container class and that the necessary methods are overridden.
Check Component Dialog: Ensure that the component dialog for the container component is correctly configured to include the necessary fields for the additional properties. Verify that the dialog fields are correctly mapped to the corresponding properties in the container component.
Review Error Logs: Check the AEM error logs for any error messages related to the container component or its extended model. Look for any exceptions or warnings that may provide insights into the issue.
Thank you so much for the information @Raja_Reddy !!
Tried to check the resource type and the inheritance as well. Any methods are wrongly defined in the code part above are you suspecting ? Could you please have a look on the above ?
@akashkriz005 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
@kautuk_sahni - Still I am not able to find out the solution for this issue. Still working on my end. Please feel to share any comments or suggestions for this as well.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies