• Post Reply Bookmark Topic Watch Topic
  • New Topic

h:outputStylesheet link ordering  RSS feed

Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Running a JSF 2, PrimeFaces, Spring 3 MVC/WebFlow application and I've run into an issue with JSF's <h: outputStylesheet> tag. Specifically the order in which it renders all of the specified stylesheets.

PrimeFaces uses themes and a number of CSS fiels which are linked in using the JSF resource loading mechanism (in some arcane manner hidden from the developer). I am overriding certain PrimeFaces CSS classes to tweak the look & feel with a custom style.css file (which naturally, must be the final .css file linked on the rendered html).

All that to say, the stylesheets are being rendered in a bizarre order. On initial page load (after application deployment), the style.css link appears at the top of the script links:

yet after hitting refresh, the style.css link appears at the end:

Is there any way to ensure the order in which style sheets are included on the page? Seems like Mojarra/PrimeFaces are not respecting the order in which I write the includes.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!