Cannot load primefaces themes

UI Components for JSF
Post Reply
jrobertsz66
Posts: 90
Joined: 11 Jun 2012, 12:52

06 Feb 2015, 22:07

Hi,

I cannot download the primefaces themes using the lastest version of primefaces.

This is in my WEB-INF/lib directory:

all-themes-1.0.10.jar
commons-io.1.4.jar
cve-schema.jar
log4j-1.2.9.jar
primefaces-5.1.jar

And this is my page content:

Code: Select all

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:p="http://primefaces.org/ui" 
      xmlns:f="http://java.sun.com/jsf/core">
    <body>
        <h:form>
            <p:dataTable var="car" value="#{dtBasicView.cars}">
                <p:column headerText="Id">
                    <h:outputText value="#{car.id}" />
                </p:column>

                <p:column headerText="Year">
                    <h:outputText value="#{car.year}" />
                </p:column>

                <p:column headerText="Brand">
                    <h:outputText value="#{car.brand}" />
                </p:column>

                <p:column headerText="Color">
                    <h:outputText value="#{car.color}" />
                </p:column>
            </p:dataTable>
        </h:form>
    </body>
</html>
And here is the relevant section from web.xml file:

Code: Select all

<context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>glass-x</param-value>
    </context-param>
However, when I deploy the application in NetBeans and view the page in the browser, I don't see any theme at all.

I've read the demos and docs and I don't see anything at all that could be causing this and as far as I can tell, I've done everything correctly. I also don't see any errors in the glassfish log.
PrimeFaces 5.2 /GlassFish 4.1

jrobertsz66
Posts: 90
Joined: 11 Jun 2012, 12:52

06 Feb 2015, 22:23

Well,

Modifying the page and adding an empty head element fixed the issue. I copied and pasted the example from your upload demo an it did not have a complete page in it. It would be nice if your examples were complete pages.

Regards,

Joe
PrimeFaces 5.2 /GlassFish 4.1

Collin
Posts: 1
Joined: 06 Apr 2015, 07:13

06 Apr 2015, 07:14

Its in this context where I see a problem to be corrected in the future. Because there are, or I can see, two ways:
- Customizer a similar theme (as possible). It is a very expensive task. Potencially ver much, sure.
- Do not apply any theme (including NONE as theme). In this case, I can check personally that the functionality of many complex components is lost (for example, component ui-icons needs at least some css to display themself and enable specific action). Again a very hard task.
NAT

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 38 guests