Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 11661

Adding/Removing PrimeFaces header CSS and JavaScript to specified pages

$
0
0

My web project unfortunately has two jars, Mojarra and PrimeFaces and we cannot remove it, the project is too big legacy.
I have removed the CSS and JS belonging to PrimeFaces, by adding the following lines to faces-config.xml

<render-kit><renderer><component-family>javax.faces.Output</component-family><renderer-type>javax.faces.Head</renderer-type><renderer-class>com.sun.faces.renderkit.html_basic.HeadRenderer</renderer-class></renderer></render-kit>

But we need to add these PrimeFaces head stuff to specific pages.

page1.xhtml: must not has these PrimeFaces CSS and JS.
page2.xhtml: has to these PrimeFaces CSS and JS.

Is there any workaround here?


Viewing all articles
Browse latest Browse all 11661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>