I'm trying to port custom component to OOTB List component in AEM 5.6.1. Custom component keeps its settings in the node properties which names are different from what com.day.cq.wcm.foundation.List is expecting.
For example: custom component has tag filter implemented and its values stored in the property named "featuredTags", OOTB List component is looking for the property named "tags" (JavaDoc).
Is there a way how to populate or map such properties on the fly without actually updating repository?
Solved! Go to Solution.
Ok, probably i wasn't explicit in my answer so here are some details:
And here comes the problem. Since /apps/<myapp>/components/publicationList already existed before and was completely independent from the OOTB list component it has its own config parameters assigned in multiple instances of that component used in different pieces of content. It didn't use com.day.cq.wcm.foundation.List before and used Xpath query to extract data from repo. What I'd like to do is to leverage OOTB functionality (implying com.day.cq.wcm.foundation.List utilization) for that old component. And the question is how I can "emulate" certain property of the node using value of another property without actually changing the repository? com.day.cq.wcm.foundation.List takes SlingHttpServletRequest for initialization so whatever I do with the Node (adapted from the current resource) is not presented in the scope used for List initialization. I don't want to actually write into repository during runtime (for performance and security reasons) and wanted to avoid background update of the repo information - system is live and old component is being used by multiple authors.