For our requirement, I am creating a class called ListDelegate and implementing the List component interface. because i want to add extra functionlity sortBy ranking (which i added in page properties) ,like sortBy asc and desc present in list, how to solve this thing or any other solution?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @knki
These links might help you. check the solutions given by @VeenaVikraman
You are utilizing the Out of the box core component feature. Plus you are adding your own customization by utilizing the Sling delegation pattern.
https://github.com/adobe/aem-core-wcm-components/wiki/Delegation-Pattern-for-Sling-Models
Hi @knki
These links might help you. check the solutions given by @VeenaVikraman
You are utilizing the Out of the box core component feature. Plus you are adding your own customization by utilizing the Sling delegation pattern.
https://github.com/adobe/aem-core-wcm-components/wiki/Delegation-Pattern-for-Sling-Models
@knki Check this https://github.com/adobe/aem-core-wcm-components/wiki/Delegation-Pattern-for-Sling-Models .also read https://medium.com/@veena.vikraman19/aem-avoiding-delegation-pattern-pitfalls-with-core-components-9...
If you are using everything from List https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/w... as is , you can just add @delegate annotation.
But I assume you are going to add one more option for sorting . That means you will need to override https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/w... the `getListItems` to modify the logic of `getStaticListItems` method to add the sorting mechanism.