I have a hashMap: HashMap<Entity1,List<Entity2>>();. How can I display content of these map with using p:dataTable in PrimeFaces ? I tried this where sheet is map
<p:dataTable value="#{tabulky.tabulka.sheet}"
var="item"
scrollable="true"
height="500"
emptyMessage=" Ziadne data nenajdene ">
<f:facet name="header">
<h:outputText value="Listocky"/>
</f:facet>
<p:column>
<f:facet name="header">
<h:outputText value="#{item}"/>
</f:facet>
<c:forEach items="#{(item.value)}" var="item1">
<p:column headerText="Hokej">
<h:outputText value="#{item1.atr1}" />
</p:column>
<p:column>
<h:outputText value="#{item1.atr2}" />
</p:column>
<p:column>
<h:outputText value=" : }" />
</p:column>
<p:column>
<h:outputText value="#{item1.atr3}" />
</p:column>
</c:forEach>
</p:column>
</p:dataTable>
but with no success
You can try like this :
Use the
p:dataTablereplace thec:forEach