Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosminpopescu14/159e7a439570c7607c9fa5ac62946a83 to your computer and use it in GitHub Desktop.
Save cosminpopescu14/159e7a439570c7607c9fa5ac62946a83 to your computer and use it in GitHub Desktop.
Methode 1
<p:dataTable var="entry" value="#{hashMap.entrySet().toArray()}">
<p:column headerText="key">
<h:outputText value="${entry.key}" />
</p:column>
<p:column headerText="value id">
<h:outputText value="${entry.value.id}" />
</p:column>
</p:dataTable>
Methode 2
<ui:repeat var="entry" value="#{hashMap.entrySet().toArray()}">
key:#{entry.key}, Id: #{entry.value.id}
</ui:repeat>
Methode 3
<h:panelGrid columns="2" width="100%">
<c:forEach var="entry" items="${hashMap}">
<h:outputText value="${entry.key}" />
<h:outputText value="${entry.value.id}" />
</c:forEach>
</h:panelGrid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment