For some reason my Primefaces is not rendering, i'm running with Eclipse and Tomcat.
As you can see on the image bellow, this is a test table with some fake data, and its not showing properly the table.
If i change the <p:dataTable>
to <h:dataTable>
it works properly.
As you can see too, there is an commandButton on the top without the primefaces theme for some reason.
Thank you guys!
my ExpensesList.xhtml:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:mp="http://primefaces.org/ui/material">
<h:form>
<h:messages />
<p:commandButton value="teste" />
<p:dataTable id="expenses" value="#{expensesController.dao.listAll()}" var="obj"
frame="box" rules="all" cellpadding="8">
<p:column headerText="Date">
<f:facet name="header">Date</f:facet>
<h:outputText value="#{obj.date}" />
</p:column>
<p:column headerText="costCenter">
<h:outputText value="#{obj.costCenter}" />
</p:column>
<p:column headerText="Description">
<h:outputText value="#{obj.description}" />
</p:column>
<p:column headerText="Diaria">
<h:outputText value="#{obj.diaria}" />
</p:column>
<p:column headerText="KM">
<h:outputText value="#{obj.km}" />
</p:column>
</p:dataTable>
</h:form>
</ui:composition>
My Web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>rd</display-name>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>enable</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>vader</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsf</welcome-file>
</welcome-file-list>
</web-app>