Reputation: 984
In my project, I have a main template page main_template.xhtml
that has all the resource file includes.
I have a styles.css
in the main template that contains styling classes of my pages. In one particular page I want to exclude the styles.css
resource file, how can I achieve that?
Upvotes: 1
Views: 209
Reputation: 1109302
As every other UI component, the <h:outputStylesheet>
also supports the rendered
attribute. You can grab the current view ID by UIViewRoot#getViewId()
and just check on that.
So, pieces put together that would look like:
<h:outputStylesheet ... rendered="#{view.viewId ne '/specific.xhtml'}" />
Upvotes: 1