OmniFaces 5.0 has been released!
The 5.0 is the first major version to finally use the XML namespace in URN format: xmlns:o="omnifaces".
<html lang="en"
xmlns:ui="jakarta.faces.facelets"
xmlns:h="jakarta.faces.html"
xmlns:f="jakarta.faces.core"
xmlns:a="jakarta.faces.passthrough"
xmlns:c="jakarta.tags.core"
xmlns:p="primefaces"
xmlns:o="omnifaces"
>
...
<o:form id="...">
...
#{o:formatDate(now, 'yyyy-MM-dd HH:mm:ss z')}
...
</o:form>
...
</html>
The older XML namespaces are still available for backwards compatiblity, but if you can, you have during OmniFaces 5.x the opportunity to migrate the older XML namespaces xmlns:o="http://omnifaces.org/tags" and xmlns:of="http://omnifaces.org/functions" to the single new XML namespace xmlns:o="omnifaces". Yes, the both old namespaces of OmniFaces tags and EL functions have been merged into a single namespace for sake of simplicity.
The remaining changes in 5.x as seen at What's new in OmniFaces? in the showcase are as follows:
- Alignment with Jakarta EE 11, so minimum dependencies have changed from Java 11, Faces 3.0, EL 4.0, Servlet 5.0, CDI 3.0, WS 2.0 and BV 3.0 to Java 17, Faces 4.1, EL 6.0, Servlet 6.1, CDI 4.1, WS 2.2 and BV 3.1
- All things which were during 4.x
@Deprecatedhave been physically removed. JsfLabelMessageInterpolatorhas been renamed toFacesLabelMessageInterpolator.CombinedResourceHandlerwon't anymore generate crossorigin/integrity attribute, this has been split into the new and automatically registeredCorsAwareResourceRendererso that it can also deal with non-combined resources.Faces/FacesLocal#isOutputHtml5Doctype()to determine whether the rendered output of the current view is using HTML5 doctypeFaces/FacesLocal/Servlets#resetResponse()to reset the HTTP response while retaining the original content type and character encodingFaces/FacesLocal#createResource(UIComponent)to create a Resource based on name and/or library attributs of the given UIComponent<o:formatXyzForLocale>to format using a specific java.util.Locale@RateLimitCDI annotation to rate limit method invocations in CDI managed beansFaces/FacesLocal#getResponseHeaders()which returns all headers with given name from the HTTP response<sec:authorize>,<sec:isAuthenticated>and<sec:isAnonymous>tags for Jakarta Security
Installation
Non-Maven users: download OmniFaces 5.0 JAR and drop it in /WEB-INF/lib the usual way, replacing the older version if any.
Maven users: use <version>5.0</version>.
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>5.0</version>
</dependency>
