Hi, I am trying to get a date value from a content fragment. on the AEM 6.4 doc from content Element (ContentElement ("The Adobe AEM Quickstart and Web Application.") ) has a method called getValue(), but when I trying to use it on my project is not available, I am using aem 6.4 with uber-jar 126.96.36.199. How can I get a date type from content fragment or how can I made the getValue from ContentElement interface available?
It would be great to help the community. About the use of the HTL and Sling Models, I am doing exactly this, I have a model class where I get some properties from my resource and I using the ContentFragmentManager API to get some data to show on my htl component.
my component is a kind of article where the text comes from a Content Fragment. With content fragments I can have know more than text, I can have text, date, file path, number, boolean, tags , etc, It's a very good way to create and manage content.
What exactly are you trying to do. Perhaps using a Content Fragment is not the way to go. Developing an HTL component may be a better route. All depends on what you want to do. If you have to make a lot of API calls - build a HTL component.