What's new in OmniFaces?

What's new in OmniFaces 4.3?

Release date: 23 September, 2023

Added in OmniFaces 4.3

  • #769 - <o:importConstants> and <o:importFunctions> got a new loader attribute where you can specify an object whose class loader will be used to load the class specified in the type attribute
  • #769 - New <o:loadBundle> tag which basically extends the <f:loadBundle> with a new loader attribute where you can specify an object whose class loader will be used to load the bundle, and whose Locale will be obtained with better default values than the default Faces implementation
  • #772 - Added Faces(Local)#isAuthenticated() which checks if the current request has a remote user

Fixed in OmniFaces 4.3


What's new in OmniFaces 4.2?

Release date: 24 June, 2023

Added in OmniFaces 4.2

  • #736 - PWAResourceHandler can now also be triggered via manifest.webmanifest which will eventually become the default over manifest.json
  • #740 - Added Components#getRenderedValue() 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
  • #748 - Added Components#invalidateInputs() and Components#invalidateInput() so that you can explicitly invalidate specific UIInput components by a relative client ID, e.g. when a specific DB constraint violation exception was thrown during a bean action
  • #761 - Added MessagesLocal so that you can reuse any existing FacesContext instance without the need to get it from the ThreadLocal again and again

Changed in OmniFaces 4.2

Fixed in OmniFaces 4.2


What's new in OmniFaces 4.1?

Release date: 26 February, 2023

Added in OmniFaces 4.1

  • #730 - <o:inputHidden> has now a new readonly attribute, this will basically set the model value as submitted value during the decode and then run all the validators, but it won't update the model, this is very useful when you'd like to block the form submit by a validation error based on a server-controlled model value

Fixed in OmniFaces 4.1


What's new in OmniFaces 4.0.1?

Release date: 21 November, 2022

Fixed in OmniFaces 4.0.1


What's new in OmniFaces 4.0?

Release date: 2 October, 2022

Major in OmniFaces 4.0

  • Minimum dependencies are changed from Java 1.8, JSF 2.3, EL 3.0, Servlet 3.1, CDI 2.0, WS 1.1 and BV 2.0 to Java 11, Faces 3.0, EL 4.0, Servlet 5.0, CDI 3.0, WS 2.0 and BV 3.0; as of now, OmniFaces 4.0 is NOT backwards compatible with previous versions of these dependencies because of the compiler-incompatible rename of the javax.* package to jakarta.* package.
  • All things which were during 3.x @Deprecated have been physically removed, such as <o:form includeViewParams="true"> (has become the default behavior), WebXml.INSTANCE and FacesConfigXML.INSTANCE (replaced by WebXml.instance() and FacesConfigXml.instance()) and omnifaces:fixviewstate.js (replaced by JSF 2.3 native fix)
  • #{now} and #{startup} will now return an instance of java.time.temporal.Temporal instead of java.util.Date; it still supports the time property as in #{now.time} and #{startup.time}; additionally, it's got two new convenience properties: instant and zonedDateTime as in #{now.instant}, #{now.zonedDateTime}, #{startup.instant} and #{startup.zonedDateTime}
  • Callback interfaces which dated from Java 1.7 and have replacements available in Java 1.8 are now @Deprecated. Callback.Void is replaced by Runnable, Callback.Returning is replaced by Supplier, Callback.WithArgument is replaced by Consumer and Callback.ReturningWithArgument is replaced by Function. Utility methods in Components and Events are have been adjusted.

OmniFaces 4.0 is basically the Jakartified version of OmniFaces 3.14 with the following changes:

Added in OmniFaces 4.0

  • #648 - Components#addFacesScriptResource() which allows the component developer to automatically include either the Faces 4.0-specific faces.js or the JSF 2.3-specific jsf.js depending on whether the former is available as a resource in the current deployment
  • #655 - Faces#addResponseCookie() got a new overload which allows adding custom attributes to the cookie such as SameSite:None (NOTE: works currently only when using minimally Mojarra 4.0.0-M2 on top of minimally Servlet 6.0.0-M1)

Changed in OmniFaces 4.0

  • #675 - All <h:outputScript library="omnifaces"> resources such as omnifaces.js were migrated from JavaScript to TypeScript