Java EE6/CDI JSF2 Primefaces 3.3.1. I created a search page with a few cascading dropdowns that are used to generate a table of search results If I use jsf:
<h:dataTable var="_employeeVList" value="#{employeeVProducer.employeeVList}" rendered="#{not empty employeeVProducer.employeeVList}">
<f:facet name="header">
Employee Search Results
</f:facet>
<h:column>
<f:facet name="header">Area</f:facet>
<h:outputText value="#{_employeeVList.areaName}" />
</h:column>
...
</h:dataTable>
The table renders with output, html looks normal. But when I change to primefaces:
<p:dataTable var="_employeeVList" value="#{employeeVProducer.employeeVList}" rendered="#{not empty employeeVProducer.employeeVList}">
<f:facet name="header">
Employee Search Results
</f:facet>
<p:column>
<f:facet name="header">Area</f:facet>
<h:outputText value="#{_employeeVList.areaName}" />
</p:column>
...
</p:dataTable>
The table doesn't display. When I look at the source with firebug I see some weirdness with the html:
<table id="searchForm:results">
<tbody>
<tr>
<td>
<p:datatable rendered="true" value="[com.raytheon.myPkg.EmployeeV@f486, com.raytheon.myPkg.EmployeeV@88fe, com.raytheon.myPkg.EmployeeV@adaf,
...
com.raytheon.myPkg.EmployeeV@6a5b]"
var="_employeeVList">
<p:column></p:column>
<p:column></p:column>
...
</p:datatable></td>
</tr>
</tbody>
</table>
The objects are in the tag label, the columns are empty.
Elsewhere in the page I'm using p:panelGrid, that contains the dropdowns and that displays correctly.
I have h:head and h:body in my default template page.
The table is backed by a stateful request scoped bean.
I'm not using any external JavaScript.
What am I doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…