2.1-RC1 has been released!<dependency> <groupId>org.omnifaces</groupId> <artifactId>omnifaces</artifactId> <version>2.1-RC1</version> </dependency>
For 1.x users (JSF 2.0 compatible, no CDI, no new OmniFaces 2.x additions), there's the 1.11-RC1 with necessary bugfixes and enhancements on existing components/tags/utilities.
What is OmniFaces?
Tired of reinventing
FacesUtils utility classes for every JSF web application and/or homebrewing custom components, taghandlers, etc to workaround or enhance some general shortcomings in JSF? OmniFaces may be what you're looking for!
OmniFaces is a utility library for JSF 2 that focusses on utilities that ease everyday tasks with the standard JSF API. OmniFaces is a response to frequently recurring problems encountered during ages of professional JSF development of the JDevelopment team and from questions being asked on Stack Overflow.
Contrary to some of the other excellent JSF 2 libraries out there (like PrimeFaces, or RichFaces), OmniFaces does not contain much if any of the beautiful visually oriented components that those other libraries are already known and loved for. As such, OmniFaces does not and probably will never contain things like rich table or datagrid components. OmniFaces is more geared toward "utilities" that solve everyday practical problems and workarounds for small shortcomings in the JSF API. Such utilities and workarounds can be based on components, but OmniFaces does not necessarily strive to be a "component library" perse. OmniFaces can just be used together with any component library.
Besides utility classes for working with the JSF API from Java code, such as Faces and Messages, and utility and enhanced components, such as o:highlight and o:viewParam, OmniFaces will include various general converters, validators and Facelets tag handlers. These will range from "all-or-none" validators to converters which automatically convert Java models for usage in f:selectItem(s). There are also specialized handlers, such as a full ajax exception handler which will automatically handle all ajax exceptions with the default web.xml error-page mechanisms and a combined resource handler which will automatically combine all separate CSS/JS resources into a single resource. CDI specific features are available such as transparent support for injection in @FacesConverter and @FacesValidator. For a full overview of what's all available in OmniFaces and several live examples, look at the showcase.
An important design goal will be to have as few dependencies as possible and to be minimally invasive. So far, OmniFaces 1.x only requires Java 1.6, JSF 2.0, EL 2.1 and Servlet 2.5 APIs which is already minimally available in a fairly modern servlet container serving a JSF 2.x web application. OmniFaces 2.x goes a step further by requiring Java 1.7, JSF 2.2, EL 2.2, Servlet 3.0 and CDI 1.1 APIs which is already minimally available in a fairly modern servlet container serving a JSF 2.2 web application.
Since OmniFaces 1.6 there is an optional dependency on CDI, which turned out to be troublesome in some outdated environments, so they were since version 1.10 removed from version 1.x for a better compatibility with those environments. The CDI specific features remain in version 2.x whereby the CDI dependency is thus made required. Version 1.x users who are already using CDI specific features on a JSF 2.1 environment should be able to effortlessly migrate to version 2.x. As of now, OmniFaces 2.x is backwards compatible with JSF 2.1, but not with JSF 2.0 anymore due to the new
All versions have an optional dependency on JSR303 Bean Validation which is only required when you actually use
OmniFaces should principally integrate perfectly well with most other JSF component libraries. Even more, the OmniFaces showcase application uses PrimeFaces. If you encounter problems in combination with a specific component library, then by all means report an issue. We'll investigate if it's caused by OmniFaces or the component library in question and fix it or propose a workaround solution, depending on the nature of the problem. Note that OmniFaces is due to the mandatory Servlet API dependency not compatible with portlets.
It is a matter of dropping the OmniFaces 2.0 JAR file in
Maven users can add OmniFaces by adding the following Maven coordinates to pom.xml:
<dependency> <groupId>org.omnifaces</groupId> <artifactId>omnifaces</artifactId> <version>2.0</version> </dependency>
For users on outdated environments who can't/won't use CDI, use 1.10 instead.
The OmniFaces UI components/taghandlers and EL functions are available under the following XML namespaces:
- OmniFaces library
- OmniFaces sources
- OmniFaces javadoc
- OmniFaces API documentation
- OmniFaces VDL documentation
- OmniFaces wiki pages
If you have found bugs or have new ideas, feel free to open a new issue.
OmniFaces in the worldwide news and literature
- JAXenter - JSF-Bibliothek OmniFaces 2.0 erschienen (German)
- OSChina - OmniFaces 2.0 发布，JSF2 工具库 (Chinese)
- OmniFaces Fans - OmniFaces 2.0 is here!
- Beyond Java - OmniFaces 2.0 released
- Thoughts on software development - Building dynamic responsive multi-level menus with plain HTML and OmniFaces
- Java vs .NET SQLWorld presentation (Japanese)
- Mastering JavaServer Faces 2.2 - a.o. Chapter 7
- Bytes Lounge - How to cache component rendering in JSF example
- Beyond Java - Why JSF 2.0 Hides Exceptions When Using AJAX (about FullAjaxExceptionHandlerFactory)
- Adictos al Trabajo - Omnifaces: una librería de utilidades para JSF2 (Spanish)
- JSFCentral - Arjan Tijms and Bauke Scholtz (BalusC) Talk about OmniFaces and Building zeef.com
- OIO - JSF Performance Tuning (with CombinedResourceHandler)
- Challenge Java EE - JSFでPDFファイルを開いたりダウンロードしたりしてみる (download PDF files in JSF) (Japanese)
- OSChina - OmniFaces 1.4 发布，JSF2 工具库 (Chinese)
- JAXenter - JSF-Bibliothek OmniFaces vereinfacht HTML Messages (German)
- JAXenter - Besser spät als nie: JSF-Bibliothek OmniFaces 1.4 mit überarbeiteten FacesViews (German)
- JAXenter - Nie wieder "View Expired": JSF-Bibliothek OmniFaces 1.3 erschienen (German)
- Entwicklertagebuch - OmniFaces - Das Schweizer Taschenmescher für JSF-Entwickler (German)
- Un Poco de Java - OmniFaces: librería de utilidad para JSF (Spanish)
- InfoQ - OmniFaces: uma biblioteca de utilitários para JSF (the Brazilian-Portuguese translation of previous English article)
- InfoQ - OmniFaces: A Utility Library for Java Server Faces