Hi, the model classes in my below mentioned sightly script are not loading. What is wrong with it?
<sly data-sly-use.model="com.cbdt.core.models.AddToCart class="aem-add-to-cart-wrapper standalone-add-to-cart">
<sly data-sly-use.info="com.cbdt.core.models.ConfigModel">
<a class="aem-add-to-cart" href="/search/${model.skuList @ join=' OR '}" target="_blank">
<img alt="add-to-cart" src="${info.iconPath}/add-to-cart.svg"/>${properties.buttonlabel}
</a>
</sly>
</sly>
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @goyalkritika
You would first need to confirm following:
If the package isn't exported, create a package-info.java in corresponding directory of the core bundle. Example:
Views
Replies
Total Likes
Hello @goyalkritika
You would first need to confirm following:
If the package isn't exported, create a package-info.java in corresponding directory of the core bundle. Example:
Views
Replies
Total Likes
The interface is exported from the bundle.
Also, model classes are present.
Views
Replies
Total Likes
What error are you getting?
I see two sling models are there in the sightly snippet you provided. Make sure the dependencies (if any) injected in the model classed are resolved properly. Since its getting registered properly I assume annotations references from correct package.
To troubleshoot that, you can disable them by commenting out and pass static/hardcoded data (just to see the life cycle execution end to end).
Please let me know you findings.
Views
Replies
Total Likes
Views
Likes
Replies