I'm having a hard time using the primefaces datatable along with jsf, I've tried to implement it in a way:
<p:tabView>
<p:tab title="Alterar Usuarios">
<h:form prependId="false">
<h:panelGrid columns="2" cellpadding="2" cellspacing="2">
<p:dataTable var="p" value="#{usuarioController.findAll()}"
border="1" cellpadding="2" cellspacing="2"
paginator="true" rows="2" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink}
{PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15"
>
<h:column>
<f:facet name="header">Id</f:facet>
<h:outputText value="${p.id}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Nome</f:facet>
<h:outputText value="${p.nome}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Sobrenome</f:facet>
<h:outputText value="${p.sobrenome}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="${p.email}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Data de Nascimento</f:facet>
<h:outputText value="${p.datanascimento}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">CPF</f:facet>
<h:outputText value="${p.cpf}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Senha</f:facet>
<h:outputText value="${p.senha}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Usuario</f:facet>
<h:outputText value="${p.usuario}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Opçoes</f:facet>
<h:commandLink value="Alterar"
action="#{usuarioController.edit(pr)}"></h:commandLink>
</h:column>
<h:column>
<h:commandButton value="Voltar" action="welcome"></h:commandButton>
</h:column>
</p:dataTable>
</h:panelGrid>
</h:form>
</p:tab>
</p:tabView>
But only this visual returns me:
Someone could help me, I'm new with primefaces, since I'm grateful!