0
votes

I'm trying to get a custom theme working in my Primefaces project. I've created the theme using Themeroller and packed the jar as follows:

  • primefaces-spl.jar
    • WEB-INF
      • resources
        • primefaces-spl
          • theme.css
          • images

I then put this file into my WEB-INF/lib folder and specified the primefaces.THEME attribute to 'spl' in my web.xml.

The project can seemingly find and use the jar, but the page looks like this:

Thus, it looks like the resource images are not read properly. In theme.css, I have replaced all image tags as follows:

.ui-widget-overlay { background: #aaaaaa url("#{resource['primefaces-spl:images/ui-bg_flat_0_aaaaaa_40x100.png']}") 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }

I have also tried adding the jar to the classpath as well as the alternative strategy mentioned here: http://www.mkyong.com/jsf2/primefaces/create-a-custom-theme-in-primefaces/ Did I miss something?

1

1 Answers

1
votes

An online tool is also available to convert ThemeRoller zip files to Primefaces theme jars: https://themeroller.osnode.com. ThemeRoller versions: 1.10.3 & 1.9.2 are supported.

Just drag your zip file over and download the converted jar files. Maven instructions are included.

Although this is not EXACTLY answering you question directly you would easily acquire the desired knowledge by inspecting the generated theme jar which would organize your files correctly.

Also your question might not be relevant when there i alternate way of achieving your goal without having to inspect file structures...