Below I will describe solutions to common problems occurring working with PrimeFaces JSF components library.
Components size
Probably everyone who started to use the library asked the question “Why components look so huge?”.
To solve this problem, just add following CSS code inside <h:head></h:head>
tag:
1 2 3 4 5 6 |
|
PrimeFaces vs Internet Explorer
Internet Explorer may incorrectly render pages in which you using PrimeFaces components. To solve this problem is recommended to set the X-UA-Compatible header. In old versions of this library (< 3.0) you can make this by adding meta tag in <h:head></h:head>
tag first. But in newest versions library first renders own code in head tag, and next user code. For solve this in version 3.0 introduced the “first” facet, which renders exactly first in head tag:
1 2 3 4 5 6 7 8 9 |
|
Vertical tabs in p:tabView
Because this library based on jQueryUI, for create vertical tabs we can use this demo as solution. First add following CSS:
1 2 3 4 5 6 7 8 |
|
And add styleClass property to your tabView:
1
|
|
That’s it ;) This solution based on following questions on StackOverflow: * Make tabs appear vertically on the side when using PrimeFaces TabView * Vertical Tabs with JQuery?