I inherited a Tridion 2013 page that has a metadata field set to "Embedded Schema", with "allow multiple values" checked.
I am trying to access these values on a JSP page from the pageModel
. The page model is just the default from DXA com.sdl.webapp.common.api.model.PageModel
pageModel.meta
seems to be returning ONLY the first value, with the key and value sent as separate entries, and none of the additional values showing up at all.
In other words, if these were my values
MultipleField
- exampleKey1 exampleValue1
- exampleKey2 exampleValue2
- exampleKey3 exampleValue3
and if this was my code (much simplified)
<jsp:useBean id="pageModel" type="com.sdl.webapp.common.api.model.PageModel" scope="request" />
<c:forEach var="meta" items="${pageModel.meta.entrySet()}">
${meta.key} ${meta.value}
</c:forEach>
What I would get back would be
MultipleFieldKey exampleKey1
MultipleFieldValue exampleValue1
None of the other values would show up at all.
Am I accessing this wrong? Or was the metadata set up improperly in Tridion?
List<>
, in thepageModel
?