0 Replies Latest reply on Aug 25, 2007 9:28 PM by Andreas Franke

    select multiple entities for datatable

    Andreas Franke Apprentice

      Have used several attempts to display data from multiple entities without success

      List reslist = entityManager.createQuery("select qr.gpnum, csy.name from QueryResult qr, Csy20oats csy where qr.gpnum=csy.y20gpnum").getResultList();
       return reslist;


      <rich:dataTable id="entitylist" var="results" value="#{gmBean.resultList}">
       <h:column>
       <f:facet name="header">name</f:facet>
       #{results.name}
       </h:column>
       <h:column>
       <f:facet name="header">gpnum</f:facet>
       #{results.gpnum}
       </h:column>
      
       </rich:dataTable>


      display data from only one entity - no problem
      List reslist = entityManager.createQuery("select qr from QueryResult qr, Csy20oats csy where qr.gpnum=csy.y20gpnum").getResultList();
       return reslist;


      Also have used ListDataModel, but it's the same.

      Is it possible to display data from multiple entities and if 'yes', what I have to do?