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
- A JSF project.
- Primefaces theme jar file which can be downloaded from primefaces theme repository.
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.
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.