0 Replies Latest reply on Aug 6, 2008 6:07 PM by webera

    Show Map with key and a list as value

    webera

      Hi,

      I try to display a dynamic map which is this way defined:
      Map<Speech, List < Exercise > >
      The key should be the column header and the list should be the
      content for the current Speech.
      I use this code but it does not display anything

      exerciseManagerBean.allEx ==> Map<Speech, List < Exercise > >
      --------------------------------------------------------------------------
      <rich:dataTable>
      <c:forEach items="#{exerciseManagerBean.allEx}" var="curr">
      <rich:subTable value="#{curr.value}" var="currItem">
      <rich:column>
      <f:facet name="header">
      <h:outputText value="#{curr.key.name}"/>
      </f:facet>
      <h:outputText value="#{currItem.name}"/>
      </rich:column>
      </rich:subTable>
      </c:forEach>
      </rich:dataTable>

      -------------------------------------------------------------------------------------

      Can anybody help me please? Is there a better / more elegant way (perhaps without using jstl)?