OmniFaces

Last updated
OmniFaces logo.png
Original author(s) Bauke Scholtz / Arjan Tijms
Stable release 3.7.1
July 12, 2020
Written in JSF API, Java
Operating system Cross-platform
Type JSF, Ajax, Java
License Apache License 2.0
Website http://omnifaces.org/

OmniFaces is an open source utility library for the JavaServer Faces 2 framework. It was developed using the JSF API, and its aim is to make JSF life easier by providing a set of artifacts meant to improve the functionality of the JSF framework. Omnifaces was created in response to seeing the same questions and the same example and utility code posted over and over again. [1] It simply comes as an answer to day-by-day problems encountered during working with JSF (e.g. bug fixing, pitfalls, missing features, missing utilities, common questions, etc.). Many of these problems were collected from StackOverflow. [2]

Contents

OmniFaces was developed by two members of the JSF Expert Group (JSF EG), Bauke Scholtz (aka BalusC) [3] and Arjan Tijms. [4]

OmniFaces can be used in both JSF implementations, Mojarra and Apache MyFaces, and is intended to work in cooperation with existing JSF libraries, [2] like PrimeFaces, OpenFaces, ICEfaces, MyFaces Trinidad, etc.

History

The OmniFaces project started on 1 March 2012. The latest release is OmniFaces 3.0 (released on 3 January 2018).

Release history

       Release           Release  Date     Highlights
OmniFaces 1.0June 1, 2012
  • highlighting fields that failed validation
  • automatically setting label of associated input component
  • include Servlets and JSP pages in Facelets
  • Ajax aware exception handler
  • extensionless URLs
  • passing a method expression into Facelets tag, multi-field validators
OmniFaces 1.1July 10, 2012
  • form with support to include view parameters in action URL
  • HTML5 render kit
  • new Messages builder
  • new validator which validates if ALL of the given inputs have been filled out
OmniFaces 1.2October 20, 2012
  • support for programmatically executing callback scripts in Ajax response
  • fix for dealing with ViewExpiredException
  • buffers the Ajax response fully until buffer size
OmniFaces 1.3December 20, 2012
  • new Ajax#updateRow() and Ajax#updateColumn()
  • new <o:enableRestorableView>
  • new <o:validateBean>
  • new SelectItemsIndexConverter
  • new <o:commandScript>
OmniFaces 1.4March 11, 2013
  • new for attribute in <o:validator> so that it can target inputs in composites
  • UnmappedResourceHandler which removes the JSF prefix/suffix mapping from resource paths
  • <o:importFunctions> taghandler to import public static non-void methods of a given type as EL functions
  • <o:param> which extends <f:param> with support for a Converter
OmniFaces 1.5June 10, 2013
  • added new includeRequestParams attribute to <o:form>
  • <o:messages> which extends <h:messages> with support for multiple client IDs in for attribute
  • ability to disable HTML escaping and ability to perform markupless rendering like <ui:repeat>
  • message interpolator for Bean Validation that allows a component's label to be inserted in the middle of a message
  • added converters for an Iterable to List and DataModel
  • new protected methods FullAjaxExceptionHandler#findExceptionRootCause() and #findErrorPageLocation() so that it can easier be subclassed
OmniFaces 1.6September 19, 2013
  • OmniFaces depends on CDI from this version on
  • injecting, converting and validating HTTP request parameters via CDI @Param
  • transparent support for dependency injection (CDI and EJB) inside @FacesConverter and @FacesValidator
  • new JNDI utility class
  • CDI compatible @ViewScoped annotation specifically for JSF 2.0/2.1
  • useRequestURI attribute for <o:form> to submit to exactly the same URL as in browser's address bar (with query string)
OmniFaces 1.7January 13, 2014
  • new ValueChangeValidator
  • new CacheControlFilter which can control cache-related headers of the response
  • added SortedTreeModel which holds the <o:tree> children in a TreeSet
OmniFaces 1.8.1June 2, 2014
  • added <o:deferredScript> which is capable of deferring JavaScript resources to window.onload
  • <o:massAttribute> which sets the given attribute on all nested components
  • FacesMessageExceptionHandler which sets any caught exception as a global FATAL faces message
  • <o:cache> has new disabled attribute to temporarily disable the cache and pass-through children directly
  • <o:viewParam> skips converter for null model values so that query string doesn't get polluted with an empty string
OmniFaces 2.0November 24, 2014
  • NoAutoGeneratedIdViewHandler which throws a runtime exception when an autogenerated JSF client ID is being rendered
  • <o:viewParamValidationFailed> which enables sending either a redirect or error status on validation failure of view parameters
  • <o:graphicImage> which is capable of referencing a byte[] or InputStream property with optional support for data URI format
  • <o:moveComponent> via which components, facets and behaviors can be moved at runtime to a target component in various ways
  • <o:resolveComponent> via which a component can be looked up by its ID and a reference to it put in various scopes
  • <o:validateBean> now supports validating beans at the class level
OmniFaces 2.1June 3, 2015
  • <o:tagAttribute> to explicitly declare a tagfile attribute which is only exposed in tagfile's own EL scope, to prevent pollution in EL scope of nested tagfiles
  • FacesConfigXml to get faces-config.xml entries which are not available via native JSF API (currently only a mapping of all <resource-bundle> entries can be obtained)
  • <o:graphicImage> now also supports SVG images with explicit type="svg" attribute and fragment attribute for SVG view modes
  • @Cookie to inject a HTTP request cookie in a CDI managed bean
  • CombinedResourceHandler now supports server-side caching of combined resources via org.omnifaces.COMBINED_RESOURCE_HANDLER_CACHE_TTL context param
  • @Eager now also supports JSF 2.2 javax.faces.view.ViewScoped
OmniFaces 2.2November 24, 2015
  • Second life for @ViewScoped
  • FileServlet - New FileServlet with advanced HTTP range and caching support
  • <o:viewAction> - Fix unintuitive "if" attribute of <f:viewAction>
OmniFaces 2.3April 1, 2016
  • @ViewScoped - Improved
  • <o:socket> - For web socket based push which can be accessed via CDI @Push
  • <o:skipValidators> - To skip all validation during a UICommand action or an ajax request
  • FileServlet - Supports customizing 404 error handling and attachment file name
  • Beans#fireEvent() - To fire a CDI event object
  • More utilities - Beans#isActive(scope) | of:formatThousands() | of:formatThousandsUnit() | of:formatNumberDefaultForLocale() | Faces#getViewName() | Ajax#load() | Servlets#getRemoteAddr()
OmniFaces 2.4July 1, 2016
  • Components#getCurrentActionSource/ActionExpressionsAndListeners() - Which should ease a.o. logging JSF ajax actions
  • <o:url> - Which fills the gap caused by absence of JSTL <c:url> in Facelets
  • FullAjaxExceptionHandler - Got new logException override which allows determining the log reason
  • of:reverseArray() - To reverse an array
OmniFaces

3.0

January 3, 2018
  • Dependencies are changed to Java 1.8, JSF 2.3, EL 3.0, Servlet 3.1, CDI 2.0 and BV 2.0
  • Removed RichFaces compatibility since End of Life was declared for RichFaces in June 2016
  • OmniFaces initialization will explicitly fail if CDI BeanManager is unavailable during application startup
  • <o:form> now defaults to useRequestURI="true"
  • <o:form> now defaults to partialSubmit="true"
  • <o:validateBean showMessageFor="@violating"> will not anymore show "remaining" messages for properties which are not covered by JSF form
  • ValidateMultipleFields will no longer skip readonly/disabled/unrendered components but instead supply their current model value
  • org.omnifaces.component.output.cache package has been moved to org.omnifaces.util.cache
  • Faces/FacesLocal and Servlets utility methods will now throw UncheckedIOException instead of IOException
  • All in 2.x @Deprecated things have been removed and replaced by JSF 2.2 native passthrough attributes
  • and other

See also

Other JSF libraries:

Related Research Articles

<span class="mw-page-title-main">NetBeans</span> Integrated development environment software for software development

NetBeans is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called modules. NetBeans runs on Windows, macOS, Linux and Solaris. In addition to Java development, it has extensions for other languages like PHP, C, C++, HTML5, and JavaScript. Applications based on NetBeans, including the NetBeans IDE, can be extended by third party developers.

Jakarta Faces, formerly Jakarta Server Faces and JavaServer Faces (JSF) is a Java specification for building component-based user interfaces for web applications and was formalized as a standard through the Java Community Process being part of the Java Platform, Enterprise Edition. It is also an MVC web framework that simplifies the construction of user interfaces (UI) for server-based applications by using reusable UI components in a page.

<span class="mw-page-title-main">Apache Geronimo</span> Open-source web application server

Apache Geronimo is an open source application server developed by the Apache Software Foundation and distributed under the Apache license.

In computing, Oracle Application Development Framework, usually called Oracle ADF, provides a Java framework for building enterprise applications. It provides visual and declarative approaches to Java EE development. It supports rapid application development based on ready-to-use design patterns, metadata-driven and visual tools.

<span class="mw-page-title-main">Apache Tapestry</span> Open-source web application framework

Apache Tapestry is an open-source component-oriented Java web application framework conceptually similar to JavaServer Faces and Apache Wicket. Tapestry was created by Howard Lewis Ship, and was adopted by the Apache Software Foundation as a top-level project in 2006.

Echo is a web application framework created by the company NextApp. The latest iteration, Echo3, allows writing applications in either server-side Java or client-side JavaScript. Server-side applications do not require developer knowledge of HTML, HTTP, or JavaScript. Client-side JavaScript-based applications do not require a server, but can communicate with one via AJAX.

<span class="mw-page-title-main">Apache MyFaces</span> Open-source implementation of JavaServer Faces

Apache MyFaces is an Apache Software Foundation project that creates and maintains an open-source JavaServer Faces implementation, along with several libraries of JSF components that can be deployed on the core implementation. The project is divided into several sub-projects:

The Jakarta Expression Language is a special purpose programming language mostly used in Jakarta EE web applications for embedding and evaluating expressions in web pages. The specification writers and expert groups of the Java EE web-tier technologies have worked on a unified expression language which was first included in the JSP 2.1 specification (JSR-245), and later specified by itself in JSR-341, part of Java EE 7.

<span class="mw-page-title-main">JBoss Seam</span> Web application framework

Seam was a web application framework developed by JBoss, a division of Red Hat.

ICEfaces is an open-source Software development kit that extends JavaServer Faces (JSF) by employing Ajax. It is used to construct rich Internet applications (RIA) using the Java programming language. With ICEfaces, the coding for interaction and Ajax on the client side is programmed in Java, rather than in JavaScript, or with plug-ins.

<span class="mw-page-title-main">RichFaces</span>

RichFaces is an open source Ajax-enabled component library for JavaServer Faces, hosted by JBoss. It allows easy integration of Ajax capabilities into enterprise application development. It reached its end-of-life in June 2016.

Ajax4jsf was a project for an open source framework that added Ajax capabilities to the JavaServer Faces (JSF) web application framework.

In computing, Facelets is an open-source Web template system under the Apache license and the default view handler technology for Jakarta Server Faces. The language requires valid input XML documents to work. Facelets supports all of the JSF UI components and focuses completely on building the JSF component tree, reflecting the view for a JSF application.

Java view technologies and frameworks are web-based software libraries that provide the user interface, or "view-layer", of Java web applications. Such application frameworks are used for defining web pages and handling the HTTP requests (clicks) generated by those web pages. As a sub-category of web frameworks, view-layer frameworks often overlap to varying degrees with web frameworks that provide other functionality for Java web applications.

Apache MyFaces Trinidad is a JSF framework including a large, enterprise quality component library, supporting critical features such as accessibility, right-to-left languages, etc. It also includes a set of framework features, including:

The JBoss Enterprise Application Platform is a subscription-based/open-source Java EE-based application server runtime platform used for building, deploying, and hosting highly-transactional Java applications and services developed and maintained by Red Hat. The JBoss Enterprise Application Platform is part of Red Hat's Enterprise Middleware portfolio of software. Because it is Java-based, the JBoss application server operates across platforms; it is usable on any operating system that supports Java. JBoss Enterprise Application Platform was originally called JBoss and was developed by the eponymous company JBoss, acquired by Red Hat in 2006.

Apache Attic is a project of Apache Software Foundation to provide processes to make it clear when an Apache project has reached its end-of-life. The Attic project was created in November 2008. Also the retired projects can be retained.

PrimeFaces is an open-source user interface (UI) component library for JavaServer Faces-based applications, created by Turkish company PrimeTek Informatics.

References