Configure primefaces theme.

The following two tabs change content below.
Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

Latest posts by Prasad Kharkar (see all)

Hello, We’ve seen how to configure primefaces with eclipse . Primefaces uses the Themeroller framework provided by jQuery. Here, we will see how to configure primefaces theme in our web app.

To configure primefaces themes, you will need

download any theme jar file you want. I’ve downloaded blue sky theme.

As described in this article, you’ve configured primefaces with the application. To configure primefaces theme, two steps are required:

  • Copy primefaces theme jar file in WEB-INF/lib
  • Configure primefaces theme in  web.xml  as follows.

configure primefaces theme

The name of theme is configured as context parameter in web application context hence. It should be set as a context parameter. After this, this theme will be applied to all the primefaces components in your web application. <param-name>primefaces.THEME</param-name> tells the application that it will use primefaces theme. and  <param-value>bluesky</param-value>  will tell which theme to use.

 

Share Button

Prasad Kharkar

Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

One thought on “Configure primefaces theme.

  • May 16, 2015 at 11:17 pm
    Permalink

    I think you need to delete nbpojrect/ folder and build.xml file and create new web application with existing sources. (to be on the save side, delete the stuff with the IDE not running)BTW in Maven it would mean changing packaging from “jar” to “war” for the most part.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *