What's new in OmniFaces?

What's new in OmniFaces 4.6?

Release date: 24 November, 2024

Added in OmniFaces 4.6

  • c3c841f - Ajax has been split into Ajax and AjaxLocal
  • #849 - Components has been split into Components and ComponentsLocal
  • #864 - <o:importConstants>: when importing an enum, you will now be able to use instead of in case you wish to exclusively access enum members rather than all constant field values

Changed in OmniFaces 4.6

  • 02f87b9 - org.omnifaces.util.Callback (originally designed for Java 1.7!) has been deprecated in favor of the org.omnifaces.util.FunctionalInterfaces wherein the callback interfaces follow the same naming conventions as Java 8 ones
  • #867 - <o:socket> the close reason GOING_AWAY was previously suppressed in logging, but now it will be logged as FINE

Fixed in OmniFaces 4.6


What's new in OmniFaces 4.5.1?

Release date: 2 September, 2024

Fixed in OmniFaces 4.5.1


What's new in OmniFaces 4.5?

Release date: 31 August, 2024

Added in OmniFaces 4.5

  • #798 - Added Components#setAttribute() and Components#disableInput() utility methods
  • #790 - FacesConfigXml#getExceptionHandlerFactories() helper method has been added to collect all so far declared exception handler factories
  • #799 - PWAResourceHandler: added new WebAppManifest#getScreenshots() and WebAppManifest#getShortcuts() properties as per changes in w3 spec
  • #633 - Added tags for all OmniFaces converters and validators; so e.g. omnifaces.SelectItemsConverter is now also available as <o:selectItemsConverter>
  • #797 - <o:criticalStylesheet> which extends the standard <h:outputStylesheet> with default rendering of <link rel="preload" as="style"> attributes which automatically to rel="stylesheet" during window load event and is automatically moved to very top of the head and is also treated separately from default CSS resources when using CombinedResourceHandler
  • #822 - <o:link> which extends the standard <h:link> and allows including the request query string parameters of the current URL into the link's target URL
  • #824 - @Param can now be instructed to set any faces message as a global message via the new attribute @Param(globalMessage=true)

Changed in OmniFaces 4.5

Fixed in OmniFaces 4.5

  • #823 - @ViewScoped corner case threadsafety bug has been fixed (won't happen in normal production environment with standard web browsers, but only in unit test environment when bean is programmatically accessed by parallel threads)
  • Remaining fixes are same as in 3.14.6

What's new in OmniFaces 4.4.1?

Release date: 5 May, 2024

Fixed in OmniFaces 4.4.1

  • #803 - The in 4.4 introduced LruCache, used by @ViewScoped and <o:cache>, threw NPE when server is restarted with session persistence

What's new in OmniFaces 4.4?

Release date: 14 April, 2024

Added in OmniFaces 4.4

Changed in OmniFaces 4.4

  • #792 - The repackaged ConcurrentLinkedHashMap, used by @ViewScoped and <o:cache> has been replaced by simpler LRU map implementation, the org.omnifaces.util.cache.LruCache, which should reduce the amount of unnecessary AtomicReference instances in heap

Fixed in OmniFaces 4.4


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