i have multifield component and the property (composite=true) so its storing the values one by one like nodes, without using sling model is there any way to get values from those nodes like using htl(sightly).
i tried myself when this component have property (composite=false) so its storing the values in string array format and i used this one...its working but dont know for (composite=true)...
label: ${resource.label}<br>
number:${resource.number}
<div data-sly-resource="${'/content/training/homepage/jcr:content/parsys/multifieldcomponentt' }
</div>
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @mrmachi ,
if you are creating any component with multifield (composite = true) It would be easier to create either a Sling Model or Java / Javascript Use API class to get the list and then use it in the HTL file.
But, if you want to access them through HTL you can refer this article where it will differentiate the usage of multifield using sling models/ only through pure HTL.
https://levelup.gitconnected.com/aem-how-to-use-nested-multifields-in-your-components-using-a-sling-...
Hi @mrmachi ,
if you are creating any component with multifield (composite = true) It would be easier to create either a Sling Model or Java / Javascript Use API class to get the list and then use it in the HTL file.
But, if you want to access them through HTL you can refer this article where it will differentiate the usage of multifield using sling models/ only through pure HTL.
https://levelup.gitconnected.com/aem-how-to-use-nested-multifields-in-your-components-using-a-sling-...
@mrmachi Its recommonded to use sling model to get the list and then use it in the HTL file accordingly.
You can use
@ChildResource
private <ClassName> <objName>
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies