0

This is my "view", which contains this "dataTable". However, when I run the application, the rendering code does not bring the records selected by jpql

Note: the jpql is correct and bringing the right result.

Next, the method that should brings the result and "jsf view" empty record in detail:

public DataModel<Pessoa> getListaPacientes() {
    try {             
        dataModel = new ListDataModel(PessoaBo.getListaPessoa(jpaConsulta));
    } catch (BDException ex) {
        logger.severe("Classe [PacienteMb]; Método [getListaPacientes]; Exceção [" + ex.getMessage() + "]");
    } finally {
        return dataModel;
    }
}

  <h:form>
<h:dataTable value="#{pacienteMb.listaPacientes}" var="paciente">
  <f:facet name="header" rendered="#{pacienteMb.listaPacientes.rowCount > 0}" >
    <h:outputText value="Consulta de pacientes" />
  </f:facet>

  <h:column>
    <f:facet name="header">
      <h:outputText value="Nome" />
    </f:facet>
    <h:outputText value="#{paciente.nome}" />
  </h:column>
</h:dataTable>
  </h:form>

What would possibly causes the component not be rendering search results?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
BicaBicudo
  • 307
  • 1
  • 8
  • 20

0 Answers0