Jul 02

PrimeUI 0.9.5 Released Featuring DataTable

PrimeUI 0.9.5 is now available featuring the mighty DataTable widget. This widget is designed to consume JSON and for the initial implementation we have decided to provide the most common use cases;

  • Local and Remote Data
  • Pagination
  • Sorting
  • Single and Multiple Selection

Online example is available at PrimeUI showcase demonstrating both a local json array and remote json data via a JAX-RS (Jersey) Service. In future versions we plan to add various new features ported from PrimeFaces DataTable like lazy loading, expandable rows, editing, scrolling and many more.

Download

PrimeUI 0.9.5 is available at PrimeFaces Downloads Page under Apache License as usual.

Roadmap

Two tasks are remaining for the upcoming 1.0 Final release, one is the Tree widget (again will be ported from PrimeFaces Tree) and the PrimeFaces Themes for PrimeUI. Our estimate is mid august for 1.0 Final.

Posted in PrimeUI | 6 Comments
Jul 01

PrimeFaces Elite 3.5.8 Released

3.5.8 is a new PrimeFaces Elite version that brings 30 improvements to 3.5.x series making over 150 improvements to 3.5 in total with previous Elite Releases.

New Features

Defect Fixes

Enhancements

Download

Binaries, Sources, Javadocs and Tag docs are available in PrimeFaces Elite Portal for Elite Subscribers (20$ per month) as an official release bundle. PrimeFaces PRO Users can access the files from PRO Portal. Community users need to build/maintain their own PrimeFaces Builds by referencing the changes from public trunk aka 4.0-SNAPSHOT or use 4.0-SNAPSHOT builds directly to receive the improvements.

Posted in JSF | 3 Comments
Jun 28

JSF 2.2 Pass Through Attributes

JSF 2.2 has a great feature to add dynamic attributes to a component on runtime, these attributes are called pass through attributes. PrimeFaces 4.0 is aimed to support JSF 2.0,  2.1 and 2.2 at the same time using runtime detection and lately pass through attributes support is added to 4.0;

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
	xmlns:p="http://primefaces.org/ui">

	<h:head>
	</h:head>

	<h:body>

		<p:inputText value="#{bean.value}" pt:placeholder="Watermark here"/>

	</h:body>
</html>

Special thanks to PrimeFaces Friend Rudy De Busscher for his contribution regarding the implementation.

Posted in JSF | 4 Comments
Jun 27

PrimeFaces Starter Book

A brand new PrimeFaces Book is now available from Packt Publlishing authored by PrimeFaces and JSF expert Ian Hlavats.

Instant PrimeFaces Starter is great for developers looking to get started quickly with PrimeFaces. It’s assumed that you have some JSF experience already, as well as familiarity with other Java technologies such as CDI and JPA and an understanding of MVC principles, object-relational mapping (ORM), and dependency injection (DI). The sample application included with the book is fully functional and demonstrates how to use these technologies together with PrimeFaces.

Posted in JSF, Uncategorized | 1 Comment
Jun 26

New Component: Fragment

Fragment component is used to define automatic partially process and update sections whenever ajax request is triggered by a descandant component. Fragment makes it easy to define partial ajax process and update without explicitly defining component identifiers.

In the following example, required input field outside the fragment is ignored and only the contents of the fragment are processed-updated automatically on button click since button is inside the fragment.

<h:form id="form">

    <h:panelGrid columns="2">
        <p:outputLabel for="ign" value="Required:" />
        <p:inputText id="ign" required="true" />
    </h:panelGrid>

    <p:fragment autoUpdate="true">
        <h:panelGrid columns="4" cellpadding="5">
            <h:outputLabel for="name" value="Name:" />
            <p:inputText id="name" value="#{pprBean.firstname}" />
            <p:commandButton value="Submit"/>
            <h:outputText value="#{pprBean.firstname}" />
        </h:panelGrid>
    </p:fragment>

</h:form>

Check out PrimeFaces Showcase for the live demo!

This component has been requested by a PrimeFaces PRO user who has been migrating to PrimeFaces from another component suite.

Posted in JSF | 8 Comments
Jun 24

Show Message in a Dialog

Showing a message in a dialog is a common requirement and new Dialog Framework provides a way to make this easier.

Usually this can be done by placing a p:dialog on a page with a messages component inside and page author manually needs to update the messages after adding a message to request. Well, in dialog framework it is just one line of java code;

<h:form>
    <p:commandButton value="Show" icon="ui-icon-script" actionListener="#{dialogBean.showMessage}" />
</h:form>
package org.primefaces.examples.view;

public class DialogBean {

    public void showMessage() {
        RequestContext.getCurrentInstance().showMessageInDialog(new FacesMessage(FacesMessage.SEVERITY_INFO, "What we do in life", "Echoes in eternity."));
    }
}

Check out the live demo on PrimeFaces Showcase. This feature will be available in Elite 3.5.8 and Sentinel (4.0).

P.S. Special thanks to PrimeFaces Team Member and my friend Thomas Andraschko for the idea, implementing this was fun.

Posted in JSF | 5 Comments
Jun 18

Dialog Framework

Dialog Framework (DF) is a new addition to the PrimeFaces to open an external xhtml page in a dialog that is generated dynamically on runtime. This is quite different to regular usage of dialogs with declarative p:dialog components as DF is based on a programmatic API where dialogs are created and destroyed on runtime. Please note that DF and the current approach are two different ways and both can even be used together.

Usage is quite simple, RequestContext has openDialog and closeDialog methods;

    /**
     * Open a view in dialog.
     * @param outcome The logical outcome used to resolve a navigation case.
     * @param options Configuration options for the dialog.
     * @param params Parameters to send to the view displayed in a dialog.
     */
    public abstract void openDialog(String outcome, Map<String,Object> options, Map<String,List<String>> params);

    /**
     * Close a dialog.
     * @param data Optional data to pass back to a dialogReturn event.
     */
    public abstract void closeDialog(Object data);

OpenDialog enables the page author to open an xhtml referenced via a JSF navigation outcome in a dialog, the options are the configuration attributes for dialog like modal, draggable and finally the optional params are the view params to pass parameters to the dialog. CloseDialog on the other hand can be used to close a dialog programmatically without clicking the X icon and optional data attribute can be used to pass data back to the caller.

Demo

There are two demos available online;

Roadmap

Dialog Framework is available as of 3.5.7 release and future planned enhancements are support for nested dialogs.

Posted in JSF | 5 Comments
Jun 10

PrimeFaces Elite 3.5.7 Released

PrimeFaces Team is glad to announce the brand new Elite 3.5.7 release bringing the Multiple Tree DragDrop and the Dialog Framework from the Sentinel (PrimeFaces-4.0) as the highlights. In addition, 3.5.7 is equipped with various defect fixes and enhancements.

Multiple Tree DragDrop

Dialog Framework

Dialog Framework is used to display any external xhtml view in a dialog that is generated  dynamically on runtime. This is an alternative approach to using dialogs declarative with p:dialog components. Using Dialog Framework API, you can also configure the dialog, pass and retrieve data in a flow as well. Basic and Advanced demos are available at showcase.

Defect Fixes and Enhancements

Download

Binaries, Sources, Javadocs and Tag 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. Community users need to build/maintain their own PrimeFaces Builds by referencing the changes from public trunk aka 4.0-SNAPSHOT.

Posted in JSF | 3 Comments
Jun 05

Multi Tree DragDrop

DragDrop support for Tree is one of the many highlights of PrimeFaces 4.0 aka Sentinel, we have already announced the single tree dragdrop before and as planned multiple tree support is also now available. Multiple trees can be grouped together using a scope attribute.

Demo is also available at showcase (clearing browser cache is suggested).

This feature is a sponsored request from a PrimeFaces PRO client and since they also need it on an 3.5.x release that they are using at the moment, we’ll port it to upcoming 3.5.7 as well so that Elite Subscribers can get it soon without waiting for 4.0 final. Community users can either use a 4.0-SNAPSHOT (unstable) or port the tree changes to their self maintained forks.

Posted in JSF | 1 Comment
Jun 05

PrimeFaces for ASP.NET 0.2 Released

PrimeFaces Team is pleased to announce the 0.2 release of the PrimeFaces for ASP.NET Webforms.

This release brings 6 new controls to the library;

  • Button
  • Editor
  • CheckBox
  • CheckBoxList
  • CheckBoxMenu
  • RadioButtonList

Demo

Live demo is available at the temporary hosting location.

Download

DLL file is available at downloads page and that is all you need, there are no dependencies.

Roadmap

0.3 is planned for a release in two weeks time featuring various new controls ported from PrimeFaces.

Posted in JSF | Comments Off