I'm building a liferay jsf portlet which contains a few selectmanycheckboxes. For each selectcheckbox there are 2 lists. The first one is for storing the visible elements, and the second one contains the selected elements. It should be work dynamically, that's why I stored the Lists for the selectmanycheckboxes in two separate hashmaps.
I'm looping through the first hashmap for the data to display(work's fine). But then in the selectManyCheckbox I want to access the second Hashmap for the selected Elements with the key from the foreach loop (that's not working).
Is there a way to access the second Hashmap within the key from the first one?
<c:forEach var="column" items="#{ListView.columns}">
<td>
<div>
<div style="margin-bottom:1em;">
<h3>Column #{column.key}</h3>
<p:commandButton value="Hinzufügen" actionListener="#{ListView.addFromSelected}" update="@form">
<f:attribute name="destination" value="#{column.key}" />
<f:attribute name="origin" value="0" />
</p:commandButton>
</div>
<table>
<tr>
<td>
<div style="background-color:white; border:1px solid lightgray; overflow-y:scroll; min-height:200px; max-height:200px;">
<p:selectManyCheckbox value="#{ListView.selectedColumns[column.key]}" layout="grid" columns="1">
<f:selectItems value="#{column.value}" var="block" itemLabel="#{block.name}" itemValue="#{block.id}" />
</p:selectManyCheckbox>
</div>
</td>
</tr>
</table>
</div>
</td>
</c:forEach>