Dec 08

PrimeFaces Elite 5.1.6 Released

PrimeFaces 5.1.6 Elite releases focuses on maintenance and brings over 20 improvements.

New Features and Enhancements

Defect Fixes

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
Dec 01

PrimeFaces Elite 5.0.14 Released

PrimeFaces 5.0.x line is updated with a new Elite version that brings the recent enhancements from 5.1.x. Most notable improvement is the hidden container support features mentioned here.

New Features and Enhancements

Defect Fixes

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
Nov 25

PrimeFaces Elite 5.1.5 Releaed

PrimeFaces 5.1.5 is the new update for 5.1.x series bringing 18 filed improvements. There are couple of highly requested features along with the planned maintenance.

Dynamic Columns for TreeTable

Just like DataTable, TreeTable now supports dynamic columns via p:columns.

Static p:column and Dynamic p:columns can be used together and sorting is also supported using a dynamic column. Live demo is available at PrimeFaces Showcase.

Ajax Events for OrderList

Due to popular community demand, we’ve added 3 events to OrderList component to bring the flexibility of callbacks. These are;

  • select
  • unselect
  • reorder
Check out the live demo to see this in action.

New Features and Enhancements

Defect Fixes

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
Nov 21

Dynamic Columns For TreeTable

Nowadays we are implementing the most requested features by the PrimeFaces Community, one hot request was dynamic columns support for TreeTable via p:columns just like DataTable has.

Static p:column and Dynamic p:columns can be used together and sorting is also supported using a dynamic column. Live demo is available at PrimeFaces Showcase.

This enhancement is coming up next week to Elite and PRO users via 5.1.5 and to community users in 5.2.

Posted in PrimeFaces | Comments Off
Nov 20

Shared OverlayPanel

OverlayPanel is positioned relative to its target based on a one-to-one relationship, this causes limitations when used inside a data iteration because every row needs an overlaypanel which is far from ideal, requires client side memory and slows down page performance.

Since Elite 5.1.3, OverlayPanel can be shared just like a Dialog. Assume you have buttons on each datatable row and clicking this button displays the details in an overlayPanel displayed next to the button. Trick is to call the show() method by passing the client id of the caller. Live Demo is available at Showcase.

Posted in PrimeFaces | 3 Comments
Nov 18

OrderList Events

Due to popular community demand, we’ve added 3 events to OrderList component to bring the flexibility of callbacks. These are;

  • select
  • unselect
  • reorder

Usage is simple, in case you’d like to get notified whenever one of these events occur, hook-in via p:ajax;

<p:orderList value="#{orderListView.cities}" var="city" controlsLocation="none" itemLabel="#{city}" itemValue="#{city}">
        <p:ajax event="select" listener="#{orderListView.onSelect}" update="msgs"/>
        <p:ajax event="unselect" listener="#{orderListView.onUnselect}" update="msgs"/>
        <p:ajax event="reorder" listener="#{orderListView.onReorder}" update="msgs"/>
</p:orderList>
public void onSelect(SelectEvent event) {
        FacesContext context = FacesContext.getCurrentInstance();
        context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Item Selected", event.getObject().toString()));
    }

    public void onUnselect(UnselectEvent event) {
        FacesContext context = FacesContext.getCurrentInstance();
        context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Item Unselected", event.getObject().toString()));
    }

    public void onReorder() {
        FacesContext context = FacesContext.getCurrentInstance();
        context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "List Reordered", null));
    }

These events are coming soon for 5.1.5, check out the live demo to see it in action.

Posted in Java | 2 Comments
Nov 17

PrimeFaces Elite Triple Release

PrimeFaces Elite versions are updated with 3 new releases; 5.1.4, 5.0.13 and 4.0.24. Highlight of this release cycle is the major improvement for the hidden container support which has been an ongoing limitation in the past.

Hidden Container Support

The problem is well described at here along with our first solution which turned out to be limitations with the nested containers and initialization time mismatch. For 5.1.4, we’ve taken another approach and we’re glad to announce that new implementation solves all the cases we can think of. In the past, page authors had to initialize the widgets manually which is tricky most of the time, starting with 5.1.4, everything should just work.

Paginator for Mobile DataList

There is an ongoing effort in PrimeFaces Mobile, we’ve recently added a DataTable and DataGrid renderer and with 5.1.4, DataList also gets a paginator and lazy loading.

Here are the changelog for each version;

5.1.4

New Features and Enhancements

Defect Fixes

5.0.13

New Features and Enhancements

Defect Fixes

4.0.24

New Features and Enhancements

Defect Fixes

Download

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

Roadmap

4.0.24 is the last release for the 4.0.x line, it has been over a year since 4.0 and support is now discontinued. 5.0.x will be supported until the end of 2014. We strongly suggest upgrading to latest 5.1.x release to get the best PrimeFaces Experience.

Posted in PrimeFaces | Comments Off
Nov 11

PrimeFaces Elite 5.1.3 Released

PrimeFaces 5.1.3 brings handy new features such as DataGrid for PrimeFaces Mobile, keyboard navigation support for tree component, p:columns support inside p:columnGroup, core improvements to p:columnToggler and ability to use overlayPanel as standalone just like dialog.

Mobile DataGrid

Mobile DataTable has been added in 5.1.2 and our next target was a mobile renderer for DataGrid. Mobile DataGrid is responsive by nature and usage is same as the standard one. See the live demo to checkout the DataGrid in action.

Sortable and Filterable for Columns

Column and Columns components get two new attributes; sortable and filterable. These attributes are mainly added for dynamic columns where a dynamic column can be configured as sortable or filterable on demand. In the past, all dynamic columns are sortable and filterable since we were only checking the presence sortBy and filterBy expressions limiting the flexibility. Of course the change is backward compatible, these attributes are consulted only if sortBy and filterBy expressions are present.

Accessibility for Tree

Accessibility is constantly improved in PrimeFaces, 5.1.3 provides keyboard navigation support for tree component where nodes can be navigated through arrow keys and selection can be made with enter or space. Accordion and TabView will get keyboard navigation support very soon as well.

ColumnToggler Improvements

Columns can now be defined as invisible by using the new visible attribute, this also enables a Stateful ColumnToggler easily.

New Features and Enhancements

Defect Fixes

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 | 1 Comment
Nov 07

Stateful Column Toggler

Column toggler component is stateless by nature, that means changes are client side only. When visibility of a column gets hidden, the th and td elements get invisible at client side and the server side column instance is not notified. Design decision is to leave the state management to the page author at backing bean because we prefer avoiding using JSF viewstate as much as we can because to reset the changes, manual cleanup is required by the page author by accessing the component at backing bean which means coupling the bean with UI apis. So although in some cases this behavior is preferred, synchronization issues might occur on filtering and sorting because the column will pop-in again after filter or sort.

Implementing a stateful toggler is very easy thanks to the flexible PrimeFaces callbacks, for this one we’ll use the toggle ajax behavior and a list of booleans bound to the visible property of the column where we’ll change the visibility on toggle event. This is a modified version of the live demo;

 <h:form>
            <p:dataTable id="cars" var="car" value="#{dtBasicView.cars}">
                <f:facet name="header">
                    List of Cars

                    <p:commandButton id="toggler" type="button" value="Columns" style="float:right" icon="ui-icon-calculator" />
                    <p:columnToggler datasource="cars" trigger="toggler">
                        <p:ajax event="toggle" listener="#{dtBasicView.onToggle}" />
                    </p:columnToggler>
                </f:facet>

                <p:column headerText="Id" visible="#{dtBasicView.list[0]}">
                    <h:outputText value="#{car.id}" />
                </p:column>

                <p:column headerText="Year" visible="#{dtBasicView.list[1]}">
                    <h:outputText value="#{car.year}" />
                </p:column>

                <p:column headerText="Brand" visible="#{dtBasicView.list[2]}">
                    <h:outputText value="#{car.brand}" />
                </p:column>

                <p:column headerText="Color" visible="#{dtBasicView.list[3]}">
                    <h:outputText value="#{car.color}" />
                </p:column>

                <p:column headerText="Price" visible="#{dtBasicView.list[4]}">
                    <h:outputText value="#{car.price}">
                        <f:convertNumber type="currency" currencySymbol="$" />
                    </h:outputText>
                </p:column>
            </p:dataTable>

            <p:commandButton value="Refresh" ajax="false" />

        </h:form>
@ManagedBean(name="dtBasicView")
@ViewScoped
public class BasicView implements Serializable {

    private List<Car> cars;

    private List<Boolean> list;

    @ManagedProperty("#{carService}")
    private CarService service;

    @PostConstruct
    public void init() {
        cars = service.createCars(10);
        list = Arrays.asList(true, true, true, true, true);
    }

    public List<Car> getCars() {
        return cars;
    }

    public void setService(CarService service) {
        this.service = service;
    }

    public List<Boolean> getList() {
        return list;
    }

    public void onToggle(ToggleEvent e) {
        list.set((Integer) e.getData(), e.getVisibility() == Visibility.VISIBLE);
    }
}

That is it, you just need to add a list of booleans to keep the state bound to the column’s visible attribute and just onToggle event. Please note that visible attribute is recently added for 5.1.3 and 5.2 to control the visibility of the column initially.

Posted in PrimeFaces | Comments Off
Nov 05

Geocoding with Map Component

Geocoding support has been a popular feature request with over 70 watchers, as of 5.1.2 this feature is implemented by Map component using Google Geocoding service. There are two new methods added to the widget;

  • geocode(address)
  • reverseGeocode(lat, lng)

Usage is simple, these methods are invoked from the widget instance and corresponding ajax behavior events are called passing the response from Google back to the backing beans. Geocode event provides the query and the list of addresses with coordinates whereas ReverseGeocodeEvent gives the list of formatted addresses for a given coordinate.

Live demo and source code are available at PrimeFaces Showcase.

 

Posted in PrimeFaces | 1 Comment