Jepsar PrimeFaces Theme

PrimeFaces theme and FontAwesome patch for standard PrimeFaces themes

Лицензия

Лицензия

Категории

Категории

PrimeFaces Jakarta EE The Web Tier Jakarta Server Faces
Группа

Группа

com.github.jepsar
Идентификатор

Идентификатор

primefaces-theme-jepsar
Последняя версия

Последняя версия

0.9.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Jepsar PrimeFaces Theme
PrimeFaces theme and FontAwesome patch for standard PrimeFaces themes
Ссылка на сайт

Ссылка на сайт

https://github.com/jepsar/Jepsar-PrimeFaces-Theme
Система контроля версий

Система контроля версий

https://github.com/jepsar/Jepsar-PrimeFaces-Theme

Скачать primefaces-theme-jepsar

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.jepsar/primefaces-theme-jepsar/ -->
<dependency>
    <groupId>com.github.jepsar</groupId>
    <artifactId>primefaces-theme-jepsar</artifactId>
    <version>0.9.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jepsar/primefaces-theme-jepsar/
implementation 'com.github.jepsar:primefaces-theme-jepsar:0.9.1'
// https://jarcasting.com/artifacts/com.github.jepsar/primefaces-theme-jepsar/
implementation ("com.github.jepsar:primefaces-theme-jepsar:0.9.1")
'com.github.jepsar:primefaces-theme-jepsar:jar:0.9.1'
<dependency org="com.github.jepsar" name="primefaces-theme-jepsar" rev="0.9.1">
  <artifact name="primefaces-theme-jepsar" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jepsar', module='primefaces-theme-jepsar', version='0.9.1')
)
libraryDependencies += "com.github.jepsar" % "primefaces-theme-jepsar" % "0.9.1"
[com.github.jepsar/primefaces-theme-jepsar "0.9.1"]

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
javax : javaee-web-api jar 7.0

Модули Проекта

Данный проект не имеет модулей.

Jepsar PrimeFaces Theme

Note: PrimeFaces 7 resolved the issues that made me create this project. If you are using PF 7 don't bother to use this.

Usage

Make sure you've set the FontAwesome context parameter in the web.xml:

<context-param>
	<param-name>primefaces.FONT_AWESOME</param-name>
	<param-value>true</param-value>
</context-param>

Add this dependency to your pom.xml:

<dependency>
	<groupId>com.github.jepsar</groupId>
	<artifactId>primefaces-theme-jepsar</artifactId>
	<version>0.9.1</version>
</dependency>

FontAwesomeResourceHandler

This resource handler will strip the jQuery UI icons from the community PrimeFaces themes and adds FontAwesome rules to the theme. You can use it on existing applications without needing to convert all XHTML (for example ui-icon-gear to fa fa-cog). The injected CSS will take care of that.

Then, in the faces-config.xml, add the handler:

<application>
	<resource-handler>org.jepsar.primefaces.theme.jepsar.FontAwesomeResourceHandler</resource-handler>
</application>

You're done. But wait, maybe you need some custom styling? You can append a custom CSS resource by adding a context parameter in the web.xml:

<context-param>
	<param-name>org.jepsar.primefaces.theme.APPEND_CSS_RESOURCE</param-name>
	<param-value>custom.css</param-value>
</context-param>

NoThemeResourceHandler

If you want to replace the PrimeFaces theme with your own CSS, but don't want to build a theme JAR you can use this resource handler in combination with the custom CSS resource context parameter. I've found this handler to be useful when developing a theme.

Add the handler in the faces-config.xml:

<application>
	<resource-handler>org.jepsar.primefaces.theme.jepsar.NoThemeResourceHandler</resource-handler>
</application>

And the context parameter in the web.xml:

<context-param>
	<param-name>org.jepsar.primefaces.theme.APPEND_CSS_RESOURCE</param-name>
	<param-value>custom.css</param-value>
</context-param>

Theme

The theme is still work in progress. At this moment it is not ready to share yet, but it will come soon.

Icon mapping only

If you only want to use the jQuery UI to FontAwesome icon mapping:

<h:outputStylesheet name="/primefaces-jepsar/iconmapping.css"/>

Версии библиотеки

Версия
0.9.1