New features coming up in JSF 2.3

With the initial milestone release for Mojarra (JSF reference implementation) that has been released in early 2015 we can take look at the first version of the new JSF specification (JSR-372).

Besides bugfixes and improvements, the release notes show some new features of JSF 2.3. This is just an early state of the specification that will be finalized in 2016 and be part of Java EE 8 (JSR-366).

Referring to the release notes, the main focus of JSF 2.3 is on a better integration with CDI, e. g.:

  • injecting JSF artifacts like FacesContext, ExternalContext, ViewRoot and ViewMap
  • handling the EL-resolving for:
    • #{facesContext}
    • #{application}
    • #{session}
    • #{view}
    • #{viewScope} 
    • #{applicationScope}
  • providing following JSF artifacts as new CDI injection targets by the use of a new attribute called ‘managed’ in the corresponding annotation for:
    • javax.faces.component.behavior.Behavior
    • javax.faces.validatorValidator
    • javax.faces.convert.Converter

Another new feature of JSF 2.3 is the support of using java.lang.Iterable and java.util.Map as input for UIData (e.g. <h:dataTable>) and UIRepeat (e.g. <ui:repeat>).

These new features can be tested for example in GlassFish 4 Application Server by downloading the latest snapshot of JSF 2.3 here. The snapshot must be renamed to javax.faces.jar and replaced with the corresponding file in the GlassFish/glassfish/modules directory.

Short URL for this post:
This entry was posted in Java EE, Java Web Frameworks and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *