Order of resource rendering

UI Components for JSF
Post Reply
User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

14 Feb 2011, 19:37

Hello,

What is the right order of resource rendering? Current order: at first PF resources added to head automatically and then a theme. At the moment I can not achive my application resources are rendered after the theme. The default order is

1) PF resources
2) Custom web app resources.
3) Theme

I want to reverse 2) and 3) in order to achieve theme overwriting. Custom resources are added via h:output... tags.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Feb 2011, 21:12

See;

http://code.google.com/p/primefaces/iss ... il?id=1711

To achieve;

1) PF resources
2) Theme
3) Custom webapp resources with h:outputStylesheet

You need to place h:outputStysheet tags after h:body not in h:head, if you place them in h:head order would be 1-3-2 because first registered is rendered before. Note that everything is rendered in <head /> by default.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

15 Feb 2011, 19:27

Hello Cagatay,

I was aware of this fixed issue. Therefore I asked you because it was not working for me. And I didn't see this logic in HeadRenderer (theme is rendered at last). My custom resources are placed close to h:body, of course:
<h:body>
...
<h:outputStysheet .../>
</h:body>
Did you mean I have to place <h:outputStysheet .../> after </h:body>? What is the difference?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 46 guests