Search code examples
aemaem-6

AEM: reading entire multifield json values at once


I am reading a multifield value which then I have pass to a Jstl at once instead of iterating and calling the jstl each time:

I want to change my code from this :

<c:forEach items="${properties.multiproductpaths}" var="multifeaturepath">
                        <c:set var="catalog" value="${is:adapToData(multifeaturepath,currentNode,resourceResolver)}" scope="request" />
                        </c:forEach>

to this:

<c:set var="multifeaturepath" value="${properties.multifieldfeaturepath}" scope="request"/>
<c:set var="catalog1" value="${is:adapToData(multifeaturepath.multifieldkey,currentNode,resourceResolver)}" scope="request" />
                            </c:forEach>

but it doesn't seem to work ?


Solution

  • instead of iterating in jsp, pass multifield as String arrayObject of json in java and iterate over there.