Saturday, June 24, 2023

OmniFaces 4.2 / 3.14.3 / 2.7.23 released!

OmniFaces 4.2 has been released!

The PWAResourceHandler can now also be triggered via manifest.webmanifest instead of manifest.json. The manifest.webmanifest will eventually become the default resource name as per latest W3C draft on this.

The Components utility class got a bunch of new methods:

  • getRenderedValue(ValueHolder valueHolder) so that you can easily grab the to-be-rendered value of any ValueHolder component, particularly taking into account the internal state of any UIInput component, without the need to do all the checks if there's a submitted value or a local value or a converter etc
  • invalidateInputs(String... clientIds) so that you can explicitly invalidate specific UIInput components by (relative) client ID, e.g. when a specific DB constraint violation exception was thrown during a bean action which was unavoidable by a validator
  • invalidateInput(String clientId, String message, String... messageParams) which does basically the same but then allows you to add a faces message

The Messages utility class got a little brother who doesn't anywhere invoke FacesContext.getCurrentInstance(), the MessagesLocal. It has the same philosophy as FacesLocal.

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

Installation

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

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

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

How about OmniFaces 3.x, 2.x and 1.1x?

OmniFaces 3.x got the same bugfixes as 4.2 and has been released as 3.14.3. This version is for JSF 2.3 users with CDI. In case you've already migrated to Faces 3.0 or 4.0, please use OmniFaces 4.x instead. OmniFaces 2.x got the same bugfixes as well and has been released as 2.7.23. This version is for JSF 2.2 users with CDI. In case you've already migrated to JSF 2.3, please use OmniFaces 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), basically 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.

No comments: