I have problem with primefaces datatable. My .xhtml file looks like this:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<head>
<title>List of students</title>
</head>
<h:body>
<h3>List students</h3>
<h:form>
<p:dataTable var="item" value="#{studentManagedBean.students}" paginator="true" rows="10" styleClass="table table-hover"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
rowsPerPageTemplate="5,10,15" selectionMode="single" selection="#{studentManagedBean.item}" id="students" lazy="true">
<p:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{item.id}" />
</p:column>
<p:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{item.name}" />
</p:column>
<p:column>
<f:facet name="header">Age</f:facet>
<h:outputText value="#{item.age}" />
</p:column>
</p:dataTable>
</h:form>
</h:body>
</html>
But I get this:
Instead of something like this:
Do you have any idea why?