Monday, November 15, 2021

OmniFaces 3.12 released!

OmniFaces 3.12 has been released!

Nothing shocking. Just one new tag attribute and a bunch of improvements/fixes as compared to 3.11.

You can find the complete list of additions, changes and fixes at What's new in OmniFaces 3.12? list in showcase.

Installation

Non-Maven users: download OmniFaces 3.12 JAR and drop it in /WEB-INF/lib the usual way, replacing the older version if any.

Maven users: use <version>3.12</version>.

<dependency>
    <groupId>org.omnifaces</groupId>
    <artifactId>omnifaces</artifactId>
    <version>3.12</version>
</dependency>

Faces 4.0 compatibility

In the meanwhile, Mojarra 4.0.0-M1 has been released as the first Faces 4.0 implementation. Where JSF 3.0 is basically exactly the same as JSF 2.3 with merely the package renamed from javax.* to jakarta.*, Faces 4.0 will bring real changes along. Basically everything which was @Deprecated in all previous JSF versions has now finally been physically removed, including JSP support, hereby reducing the total JAR file size with nearly a half megabyte. Further it also comes with a handful goodies, among others:

  • #1552: "JSF" has been renamed to "Faces" throughout the entire source code, including class/method/variable/file names, so e.g. jsf.js is now faces.js
  • #1553: XML namespace URIs have been changed from the URL form of http://xmlns.jcp.org/jsf/* to a more future-proof URN form of jakarta.faces.*
  • #1555/#1556: <h:inputFile> now supports multiple and accept attribtues
  • #1559: new <f:selectItemGroups> tag
  • #1570: Support for custom cookie attributes such as SameSite in ExternalContext#addResponseCookie()
  • #1573: <f:websocket> now supports onerror attribtue
  • #1574: <h:selectOneRadio> and <h:selectManyCheckbox> now support layout="list" attribtue

OmniFaces 4.0-M12 is the first OmniFaces version which is not only compatible with JSF 3.0, but also fully compatible with Faces 4.0. It's basically the Jakartified version of OmniFaces 3.12 with here and there small adjustments in order to be runtime compatible with both JSF 2.3 and Faces 4.0. Especially the ability to detect whether jsf.js or faces.js should be auto-included as a resource dependency of a custom component had to be added in order to achieve this. This is also available as a new utility method: Components#addFacesScriptResource().

How about OmniFaces 2.x and 1.1x?

The 2.x got the same bugfixes as 3.12 and has been released as 2.7.14. This version is for JSF 2.2 users with CDI. In case you've already migrated to JSF 2.3, use 3.x instead.

The 1.1x is basically already since 2.5 in maintenance mode. I.e. only critical bugfix versions will be released. It's currently still at 1.14.1 (May 2017), featuring the same features as OmniFaces 2.4, but without any JSF 2.2 and CDI things and therefore compatible with CDI-less JSF 2.0/2.1.