Search code examples
jsfrichfacesprimefaces

PRIMEFACES: empty p:dataTable (binding problem)


I've simply changed working JSF h:dataTable to p:dataTable, but it's empty. Without headers, one empty row. I've installed primefaces-3.0.M1.jar to my project.

enter image description here

UPDATE: if I remove binding, dataTable is working properly, but without advantages of HtmlDataTable...

UPDATE2: don't anybody knows how to bind rich:dataTable?

Part of code:

<p:dataTable 
  id="tableDetail"
  value="#{myBdeCheck.dataListBde}"
  binding="#{myBdeCheck.dataTable}"
  var="bdeItem">

  <p:column>
    <f:facet name="header">
      <h:outputText value="Select" />
    </f:facet>
    <h:selectBooleanCheckbox value="#{myBdeCheck.selectedRow}"/>
  </p:column>

  <p:column>
    <f:facet name="header">
     <h:outputText value="Shift" />
    </f:facet>
    <h:outputText value="#{bdeItem.dayShift}"/>
  </p:column>

  <f:facet name="footer">  
    <h:commandButton id="btnAdd" action="#{myBdeCheck.add}"/>
  </f:facet>
</p:dataTable>

Did I forgot something?


Solution

  • This can be caused by binding (as you suggested yourself). You have to bind p:dataTable to

    org.primefaces.component.datatable.DataTable
    

    instead of javax.faces.component.html.HtmlDataTable