Skip to content

Migration Guide for Templates

Cagatay Civici edited this page Apr 30, 2024 · 2 revisions

Migration an application template to a newer version of PrimeFaces requires updating the PrimeFaces version and the designer folder to align the theme.

1) PrimeFaces Version

Open pom.xml and update the PrimeFaces dependency.

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>x.y.z</version>
</dependency>

2) SASS Theme

Visit the primefaces-sass-theme and download the release that matches the PrimeFaces version. Extract the contents of the bundle copy the theme-base folder, and update the designer folder at /src/main/webapp/resources/sass/theme/designer with the new content. The final structure should be like the following;

  • /src/main/webapp/resources/sass/theme/designer
    • _colors.scss
    • _common.scss _ _components.scss
    • _mixins.scss _ components

3) Compile SASS

Final step is compiling the SASS to generate CSS. Install SASS if you do not have sass at command line.

sass --update src/main/webapp/resources:src/main/webapp/resources

If you receive compilation errors, it may be due to missing SASS variables. In this case add the missing variables and compile again.

4) Support

Visit the PrimeFaces Templates Forum to create a ticket for assistance.