1

We have a webapp which uses Bootsfaces 0.9.1 for layout and Primefaces 6.0 for the components.

I noticed that the load time for pages was quite slow (even a page that only has two p:buttons on it), so I used the browsers network monitor tool to work out what was taking so long. It takes 250ms to try and load a font-awesome.css, it appears bootsfaces has hardcoded in one of it's classes (net.bootsfaces.listeners.InternalFALink) a link to maxcdn.bootstrapcdn.com and the font-awesome.css, which results in the following being inserted in the HTML

<link type="text/css" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" />

The problem is the web app does not have access to the internet so obviously it can't get this. Is there anyway to get bootsfaces to stop inserting this stylesheet, or perhaps localise the stylesheet?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
PDStat
  • 5,513
  • 10
  • 51
  • 86

1 Answers1

2

OK I found the answer, the following needs to be set in the web.xml

<context-param>
    <param-name>net.bootsfaces.get_fontawesome_from_cdn</param-name>
    <param-value>false</param-value>
</context-param>
PDStat
  • 5,513
  • 10
  • 51
  • 86
  • 1
    There's also some documentation on our showcase: http://showcase.bootsfaces.net/miscellaneous/Configuration.jsf. – Stephan Rauh Oct 05 '16 at 18:37
  • 1
    There's more documentation in a documentation page that isn't listed in the menu of the showcase. Setting the web.xml parameter is only one of several options. You can switch off font-awesome on a per-page basis, or by simply providing your own copy of font-awesome: http://showcase.bootsfaces.net/layout/resourcemanagement.jsf – Stephan Rauh Oct 05 '16 at 18:42