<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>CSS-Ordering in Liferay Single Page Application with JSF/Primefaces</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=94201346" />
  <subtitle>CSS-Ordering in Liferay Single Page Application with JSF/Primefaces</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=94201346</id>
  <updated>2026-04-06T03:59:14Z</updated>
  <dc:date>2026-04-06T03:59:14Z</dc:date>
  <entry>
    <title>RE: CSS-Ordering in Liferay Single Page Application with JSF/Primefaces</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=94296457" />
    <author>
      <name>Kyle Joseph Stiemann</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=94296457</id>
    <updated>2017-08-30T18:26:44Z</updated>
    <published>2017-08-30T18:26:44Z</published>
    <summary type="html">Hi Stephan,&lt;br /&gt;Can you provide &lt;a href="http://sscce.org/"&gt;the shortest, simplest portlet source code&lt;/a&gt; that will reproduce this problem?&lt;br /&gt;&lt;br /&gt;I can give you a potential solution now, but it may not be correct and a reproducer would help. A potential solution would be to split up your styles into Liferay theme styles and custom PrimeFaces styles. The Liferay theme styles can be included in the theme. The custom PrimeFaces styles should be included in &lt;span style="font-family: Courier New"&gt;h:head&lt;/span&gt; after the PrimeFaces theme (in the middle facet):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Courier New"&gt;&amp;lt;h:head&amp;gt;&lt;br /&gt;&amp;lt;!-- ...your code here... --&amp;gt;&lt;br /&gt;&amp;lt;f:facet name=&amp;#34;middle&amp;#34;&amp;gt;&lt;br /&gt;&amp;lt;h:outputStylesheet name=&amp;#34;custom-primefaces.css&amp;#34; /&amp;gt;&lt;br /&gt;&amp;lt;/f:facet&amp;gt;&lt;br /&gt;&amp;lt;!-- ...your code here... --&amp;gt;&lt;br /&gt;&amp;lt;/h:head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;- Kyle</summary>
    <dc:creator>Kyle Joseph Stiemann</dc:creator>
    <dc:date>2017-08-30T18:26:44Z</dc:date>
  </entry>
  <entry>
    <title>CSS-Ordering in Liferay Single Page Application with JSF/Primefaces</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=94201345" />
    <author>
      <name>Stefan Schuhbaeck</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=94201345</id>
    <updated>2017-08-29T13:55:42Z</updated>
    <published>2017-08-29T13:55:42Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&lt;br&gt;&lt;br&gt;After fixing the problem &lt;a href="https://web.liferay.com/de/community/forums/-/message_boards/message/94179445"&gt;(Liferay Faces displays hidden fragments of primefaces comp. on navigation)&lt;/a&gt;  with Primefaces componets while using Liferays Single Page Application setting,  another issue occurs.&lt;br&gt;&lt;br&gt;When SPA is activated an I use a cusstom Liferay Theme which overwrites PrimeFaces specific CSS Tags on each navigation step the default PrimeFace CSS will be loaded again but the Liferay Theme will not. Now the PrimeFaces  StyleSheets will overwrite the Liferay Theme.&lt;br&gt;&lt;br&gt; I already tried to use &amp;lt;f:facet  name="first"&amp;gt; within the header of the xhtml file as mentioned here: &lt;a href="https://www.primefaces.org/resource-rendering/"&gt;Customizable Resource Ordering&lt;/a&gt; but the overwrite still happens.&lt;br&gt;&lt;br&gt;If I remove the PrimeFace default CSS all together in the web.xml it works but I would like to use some of the default styles.&lt;br&gt;&lt;pre&gt;&lt;code&gt; 	
&amp;lt;context-param&amp;gt;
	&amp;lt;param-name&amp;gt;primefaces.THEME&amp;lt;/param-name&amp;gt;
	&amp;lt;param-value&amp;gt;none&amp;lt;/param-value&amp;gt;
&amp;lt;/context-param&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;So my question would be,  can I define the order of the Stylesheets within the header when using SPA ?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Stefan Schuhbaeck</dc:creator>
    <dc:date>2017-08-29T13:55:42Z</dc:date>
  </entry>
</feed>
