May 05

PrimeFaces 5.0 Final Released

It is once again PrimeTime! PrimeTek and PrimeFaces Team is pleased to announce the next generation of PrimeFaces as known as PF5. After months of hard work and dedication, PF5 is available to the Java EE community as a fully featured community release with Apache License.

So what is new in PF5?

Brand New Chart API
Chart components have been working well but there were limitations, new chart API introduces a new generic chart component following a model driven approach. Along the way, we have added a couple of features as well such as Date Axis support and multiple axis.

New Components

New components are always expected from a major PF release and 5 is not an exception;

  • DataScroller
  • Cache
  • Spotlight
  • ColumnToggler
  • ContentFlow

Features for Existing Components

Existing components have been enhanced with new features such as;

  • DragDrop based reordering for DataTable
  • Advanced filtering for DataTable
  • Frozen Columns for DataTable
  • Sorting for TreeTable
  • Easy javascript execution on initial page load for RequestContext
  • Filtering for SelectManyMenu and SelectOneListbox
  • ScrollPanel is reimplemented
  • Built-in mask support for calendar.

ExceptionHandler

PF5 provides a powerful exception handler by default, special thanks to Thomas Andraschko for implementing this and his many other contributions for this release.

PrimeFaces Mobile

PrimeFaces Mobile (PFM) is reimplemented from scratch and now merged in PrimeFaces Core.

PrimeFaces Mobile (PFM) is a UI Kit to create JSF applications optimized for mobile devices. PFM is built on top of jQuery Mobile, a touch-optimized HTML5 UI framework providing support for various platforms.

In addition to the seamless integration with jQuery Mobile, PFM features a Mobile Renderkit for popular PrimeFaces components, ajax framework extensions, mobile ajax behavior events, integrated navigation model, lazy loading of pages, responsive widgets and more.

PrimeFaces Push

Our partner, the founder of Atmosphere Framework, Async-IO has greatly improved PrimeFaces Push as an outsource contract. PrimeFaces Push 2.0 is based on Atmosphere as its predecessor and follows an annotation based approach this time. Old APIs are deprecated and still supported for backward compatibility. Special thanks to our good friend, founder of Atmosphere and Async-IO, Jeanfrancois Arcand for implementing PrimeFaces Push 2.0. Many framework try to use Atmosphere for Push support however PrimeFaces Push is developed by the creator of Atmosphere.

Accessibility
As usual, various components have been improved for keyboard and screenreader accessibility.

Download
PF5 is available at maven central repository, you just need to upgrade your version to 5.0. Visit downloads page for details.

Documentation
PrimeFaces User Guide is updated to cover 5.0. VDL and API docs are also available online. Please visit documentation page to access all the resources.

Migration Guide
Migrating from PF4 to PF5 should be an easy task, many of the changes are backward compatible with deprecation notices. See the migration guide for more information.

Full Changelog
Detailed changelog is available for the full list of changes.

Elite
PrimeFaces Elite has now been initiated for PF5, in two weeks time, we’ll start Elite Support for PF5 with the first 5.0.1 release while 4.0.x Elite support will continue.

New Showcase
A brand new showcase is being worked on, we hope to present it in 2-3 weeks time.

Roadmap
Next major community version would be 5.1 and our plan is to release is it in September 2014 after summer. Focus will be improving the quality and provide responsive design capabilities to the core components. Mobile development has two popular approaches, responsive vs separate page. PFM provides a solution for the separate page approach and with 5.1, PF core is planned to be optimised for responsive design.

ALWAYS BET ON PRIME!

Posted in PrimeFaces | 4 Comments
May 01

PrimeFaces Elite 4.0.13 Released

PrimeFaces 5.0 is on the horizon and 4.0 will be maintained along with upcoming 5.0.x Elite Releases. New 4.0.13 is a maintenance release with a couple of enhancements.

Download
Binaries, Sources, API docs and VDL docs are available in PrimeFaces Elite Portal for ELITE and PRO users as an official release bundle.

Posted in PrimeFaces | Comments Off
Apr 28

PrimeFaces 5.0.RC2 Released

5.0.RC1 has been tested massively by the PrimeFaces community and 5.0.RC2 is now available with the fixes of the reported issues along with some enhancements.

Download

Binaries and Sources are available at PrimeFaces downloads page. For maven users, 5.0.Rc2 is available at PrimeFaces maven repository.

RC2 is the last release before 5.0.Final next week! PrimeTime!

Posted in PrimeFaces | Comments Off
Apr 21

BeanValidation to HTML

Since JavaEE 6, validation metadata is already available for many components via the value reference and BeanValidation (e.g. @NotNull, @Size). The JSF Implementations use this information for validation and PrimeFaces already enhances this feature with client side validation.

Sometimes it’s required to manually maintain the required or maxlength attribute for input components. The “required” attribute also controls the behavior of our p:outputLabel to show or hide the required indicator (*). The “maxlength” attribute is used to limit the characters on input fields.

With PrimeFaces 5.0, you don’t need to manually maintain this attributes anymore if you already have BeanValidation constraints set on your value reference.

Configuration:

<context-param>;
    <param-name>primefaces.TRANSFORM_METADATA</param-name>
    <param-value>true</param-value>
</context-param>
@NotNull
@Max(30)
private String firstname;

XHTML:

<p:inputText value="#{myBean.firstname}" />

Output:

<input maxlength="30" .../>

Supported constraints/components;

The required attribute will be set, when @NotNull/@Min(x)/@Size(min=x) is available and the component is a EditableValueHolder:
- h:inputText
- p:inputText
- h:selectOneMenu
- p:selectOneMenu
- …

The maxlength attribute will be set, when @Max(x)/@Size(max=x) is available and the component extends from HtmlInputSecret or HtmlInputText:
- h:inputText
- p:inputText
- h:inputSecret
- …

In future, we’ll add support for more transformation options. Special thanks to PrimeFaces Core Developer Thomas Andraschko for adding this feature in addition to his other contributions to PrimeFaces.

Posted in PrimeFaces | 2 Comments
Apr 16

PrimeFaces 5.0.RC1 Released

After months of hard work, PrimeFaces Team is pleased to announce the first release candidate of the leading JavaServer Faces Framework. PF5 is the nextgen version featuring major improvements to previous gen. We’ll do a detailed announcement of the over 250 changes in upcoming 5.0 final release but here is the short overview of what is new.

  • Brand New PrimeFaces Mobile merged in Core, read more.
  • PrimePush Framework 2.0 powered by Atmosphere, read more.
  • New components such as cache, spotlight, columnToggler, contentFlow, dataScroller…
  • New features to existing components like enhanced datatable filtering, frozen datatable columns, sorting for treeTable, reimplemented scrollPanel and many more.
  • Brand new Chart API, read more.
  • Accessibility improvements with more keyboard and screen reader support to components.

In addition to all the new enhancements, thanks to PrimeFaces Elite, we’ve done a maintenance release almost every 2 weeks improving the overall quality greatly since 4.0.

Download

Binaries and Sources are available at PrimeFaces downloads page. For maven users, 5.0.Rc1 is available at PrimeFaces maven repository. 5.0.Final will be at maven central just like 4.0.

Roadmap

There will be another release candidate next week and plan is to go final at the end of this month. Take a break and start working on 5.1. Since 5.0 is a fully featured community release available to every member in our community, it is a great chance to take it on a test run and provide us feedback so that issues can get fixed for 5.0.Final. After final release, Elite Releases for 5.0.x will begin along with 4.0.x maintenance for Elite and Pro users.

Always bet on Prime!

Posted in PrimeFaces | 13 Comments
Apr 15

PrimeFaces Elite 4.0.12 Released

Although PrimeFaces team is extremely busy with the first release candidate of 5.0, we have managed to pull off the 4.0.12 release for ELITE and PRO users.

New Features

Enhancements

Defect Fixes

Download
Binaries, Sources, API docs and VDL docs are available in PrimeFaces Elite Portal for Elite Subscribers as an official release bundle. PrimeFaces PRO Users can access the files from PRO Portal.

Posted in PrimeFaces | Comments Off
Apr 08

PrimeFaces 5.0 Charts

Chart components have been working well and doing the job however there were limitations such as customizable axis, multi axis support and more in the API preventing us to add enhancements.  For 5.0, charts have been reimplemented using a brand new model driven api aimed to be flexible and easy to use.

Highlights of the changes are;

  • Introduce new generic p:chart component
  • Model driven instead of tag attributes
  • MultiAxis support.
  • DateAxis support
  • Customizable axis and series
  • Various new options introduced

Old p:*chart components are still supported but deprecated at the moment, they will be removed in a future release. We highly suggest migrating to new chart apis until then.

Demos are available at PrimeFaces 5.0 Labs.

Posted in PrimeFaces | Comments Off
Mar 26

PrimeFaces Elite 4.0.11 Released

PrimeFaces 4.0.x is back with a brand new Elite Release bringing various improvements to Elite Subscribers. Most of the enhancements in 4.0.11 are requested by PrimeFaces PRO users.

Highlights

Schedule component is improved greatly with new features such as viewChangeListener, event tooltip support, built-in timeZone handling for users in different zones and more. Also tooltip component now supports tracking the mouse.

New Features

Enhancements

Defect Fixes

Download
Binaries, Sources, API docs and VDL docs are available in PrimeFaces Elite Portal for Elite Subscribers as an official release bundle. PrimeFaces PRO Users can access the files from PRO Portal.

Posted in PrimeFaces | Comments Off
Mar 24

Enhanced DataTable Filtering

PrimeFaces DataTable Filtering has been a useful feature to quickly filter data using ajax. However there were two main limitations; it was only based on string comparison and no support for custom filtering implementations. Thanks to a PrimeFaces PRO sponsorship, filtering is greatly enhanced for PF5.

Filter Facets

Filtering elements were limited to an input text and a native dropdown, now if an input component is defined using filter facet, it becomes the filter. This enables customizable UIs, ajax update support for filters, using objects instead of simple strings as filter values and more.

New filterMatchMode options

As objects are not used instead of strings during filtering, in addition to existing startsWith, endsWidth, contains and exact modes, we have added more modes including lt, lte, gt, gte, equals and in.

...
<p:column id="yearColumn" filterBy="year" headerText="Year" footerText="lte" filterMatchMode="lte">
    <f:facet name="filter">
        <p:spinner onchange="PF('carsTable').filter()" min="1960" max="2010" styleClass="year-spinner">
            <f:converter converterId="javax.faces.Integer" />
        </p:spinner>
    </f:facet>
    <h:outputText value="#{car.year}" />
</p:column>
...

Custom Filtering
Sorting has sortFunction option on column component to enable custom sorting implementation, same is also now available to filtering as well. New filterFunction refers to a method that takes 3 parameters and expected result is a boolean to decide if value matches the filter.

<p:column id="priceColumn" filterBy="price" headerText="Price" footerText="custom (min)" filterFunction="#{tableBean.filterByPrice}">
    <h:outputText value="#{car.price}">
        <f:convertNumber currencySymbol="$" type="currency"/>
    </h:outputText>
</p:column>

Online Demo
Demo is available at PF5 Labs.

Posted in PrimeFaces | 1 Comment