skip to navigation
skip to content

Planet Jython

Last update: April 18, 2015 04:37 PM

April 12, 2015


Josh Juneau

Building and Testing JSF.next

The JSF 2.3 Expert Group is hard at work determining which features will be part of the upcoming release.  The JSF Team been working hard improving CDI alignment, among other things.  There are already a number of new features in the JSF 2.3 codebase that you can begin to test.  I will attempt to keep this post updated with the latest features that have been added.  For the most up-to-date reference, please see Manfred's blog.  To reference the information from Manfred's blog, take a look here.

JSF 2.3 Features

**Updated 04/2015:

 - PostRenderViewEvent added, which is published immediately after a view is rendered


    <f:event type="postRenderView" listener="#{managedBean.doPostProcessing}" />


- Support java.lang.Iterable in UIData and UIRepeat
 - Support for java.util.Map in UIData and UIRepeat
 - Facelets hot reload will be off by default.
   In JSF 2.2 and prior, Facelets were set to refresh the cache periodically by default.
 - Injection into the following artifacts:

  •     javax.faces.convert.Converter

  •     javax.faces.validator.Validator

  •     javax.faces.component.behavior.Behavior


Arjan Tijms explains the enhancements for CDI injection and resolving of EL artifacts very well in his post on JSF 2.3.  
Below, I list the default producers that are part of JSF 2.3.  
(As per Arjan Tijms post:  What's New in JSF 2.3?)

In order to facilitate CDI injection, there will be default producers for the following:

  •  ViewRoot

  •  ViewMap (@ViewMap)

  •  RequestCookieMap (@RequestCookieMap)

  •  SessionMap (@SessionMap)

  •  ApplicationMap (@ApplicationMap)

  •  FacesContext

  •  ExternalContext


- CDI managed validator:
  @FacesValidator(value = "myValidator", managed = true)
  public class MyValidator implements Validator {
     @Inject
     MyModel model;
    ..
  }
- CDI managed converter:
  @FacesConverter(value = "myConverter", managed = true)
  public class MyConverter implements Converter {
    ..
  }
The features that have been added as of 11/4/2014 are as follows: - Inject @ViewMap
@ViewMap
@Inject
Map viewMap;

- #1333 - Support @Inject for UIViewRoot
@Inject
UIViewRoot viewRoot;

- #1332 - Let CDI handle #{view}
- #1331 - Let CDI handle #{application}
- #1254 - contracts attribute too restrictive.
- #1328 - Let CDI handle #{session} EL resolving
- #1325 - Let CDI handle #{applicationScope}
- #1311 - Let CDI handle #{facesContext} EL resolving
- #1323 - Support @Inject for the applicationMap
@ApplicationMap
@Inject
Map applicationMap;

- #1322 - Simplify #{externalContext} to use ExternalContextProducer
- #1309 - Support @Inject for ExternalContext
@Inject ExternalContext externalContext;
- #527 - Support @Inject for FacesContext
 @Inject FacesContext facesContext;
Please reference the JavaServer Faces JIRA for more information.

  * Be sure to test against one of the milestone releases before placing JIRA issues.

  Taking JSF 2.3 for a Test Spin

 If you would like to start testing out these new features today, the easiest way to get started is to simply download the 2.3 SNAPSHOT and then replace the javax.faces.jar file within your GlassFish/glassfish/modules directory with the snapshot. You will need to be sure to reference version 2.3 in your faces-config.xml. as follows:
<faces-config  version="2.3"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd">

</faces-config>

If you are adventurous and you would like to build JSF from source, that is also fairly simple.  To do so, follow these steps:
 1)  Check out the trunk using SVN: svn checkout --username yourname --password x https://svn.java.net/svn/mojarra~svn/trunk
 2)  Copy the build.properties.glassfish file to build.properties
 3)  Edit the build.properties file and set jsf.build.home to your source home.
 4)  From the source home, run ant clean main The jsf-api.jar will be in SOURCE_HOME/jsf-api/build/lib and jsf-impl.jar will be in SOURCE_HOME/jsf-ri/build/lib

For more information on building the sources (and even contributing), please see the following reference: https://wikis.oracle.com/display/GlassFish/JavaServerFacesRI#JavaServerFacesRI-HowcanIcontribute%3F

Note that there is also a repository on GitHub that is a mirror of the official SVN repository:  https://github.com/javaeekickoff/mojarra courtesy of the folks at OmniFaces.

April 12, 2015 07:03 AM

April 09, 2015


Frank Wierzbicki

Jython 2.7 release candidate 2 available!

On behalf of the Jython development team, I'm pleased to announce that the second release candidate of Jython 2.7 is available! We've now fixed the windows installer issues from rc1. I'd like to thank Amobee for sponsoring my work on Jython. I'd also like to thank the many contributors to Jython.

Please see the NEWS file for detailed release notes. This release of Jython requires JDK 7 or above.

This release is being hosted at maven central. There are three main distributions. In order of popularity:

To see all of the files available including checksums, go here and navigate to the appropriate distribution and version.

April 09, 2015 01:30 AM

Jython 2.7 release candidate 1 available!

[Update: on Windows machines the installer shows an error at the end. The installer needs to be closed manually, but then the install should still work. We will fix this for rc2.]

On behalf of the Jython development team, I'm pleased to announce that the first release candidate of Jython 2.7 is available! We're getting very close to a real release finally! I'd like to thank Amobee for sponsoring my work on Jython. I'd also like to thank the many contributors to Jython.

Jython 2.7rc1 brings us up to language level compatibility with the 2.7 version of CPython. We have focused largely on CPython compatibility, and so this release of Jython can run more pure Python apps then any previous release. Please see the NEWS file for detailed release notes. This release of Jython requires JDK 7 or above.

This release is being hosted at maven central. There are three main distributions. In order of popularity:

To see all of the files available including checksums, go here and navigate to the appropriate distribution and version.

April 09, 2015 01:13 AM