Apr 30

Responsive Interportlet Communication with Atmosphere and PrimeFaces

March/April 2013 issue of JavaMagazine is out and Kito D. Mann from Virtua Inc. has written a great article on Interportlet Communication with PrimeFaces Push powered by Atmosphere on Liferay.

See the JavaMagazine for detailed information.

Thanks to PrimeTek’s business partners Virtua, Liferay, Async-IO for providing such an advanced technology integrated with PrimeFaces.

Posted in PrimeFaces | Comments Off
Apr 25

ProgressBar for PrimeUI

ProgressBar is ported to PrimeUI from PrimeFaces and will be available in upcoming 0.9 release;

$('#default').puiprogressbar();

<div id="default" />

Demo is available at PrimeUI Showcase.

0.9 is due early May along with the Menu Widgets of PrimeFaces followed by 1.0 featuring the DataTable Widget for REST&JSON Lovers.

Posted in PrimeUI | Comments Off
Apr 23

PrimeFaces 3.5.3 Released

PrimeTek is glad to announce a new Elite Release for PrimeFaces. Starting with 3.5.3, we’ll be calling these exclusive point releases as Elite Versions instead of maintenance versions because Elite Releases also contains new features brought from the next major release 4.0 codenamed SENTINEL.

Here is the full changelog of what 3.5.3 brings, there are 32 filed improvements and one required special attention;

Major Defect in DataTable Sorting and Filtering

We have identified an important defect with datatable sorting in combination with filtering where applying a filter causes sorting stated to be lost leading to a visual sort indicator and an unsorted data. This issue has been filed at 5254 and fixed for 3.5.3 and 4.0.

New Features

Defect Fixes

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.

Roadmap

Next Elite release in line is 3.5.4 due early May and the Next Major Release 4.0 aka Sentinel is under heavy development. Sentinel will bring various new features such as new Dialog Framework, Client Side Validation, new FileUpload, Tree DragDrop, new scrollbars, new components e.g. timeline component, improved quality on top of Elite and more are left as surprises. Sentinel is due late summer / early autumn of 2013.

PrimeTek is doing more investments in PrimeFaces and spin-off projects like PrimeFaces for ASP.NET, PrimeUI the javascript-css only UI widget framework and the PrimeFaces Mobile. Stay tuned for the upcoming news!

Always bet on Prime!

Posted in JSF | 11 Comments
Apr 22

PrimeFaces Themes 1.0.10 Released

PrimeTek is pleased to annouce a brand new release of the Themes. This new 1.0.10 bundle brings the new Delta Theme and fixes to Twitter Bootstrap theme. See changelog for details.

Delta Theme

Download

Please visit PrimeFaces Theme Gallery for download and setup instructions. As with last release there is also an all-in-one bundle containing all themes.

Keep an eye on this blog for more PrimeFaces news, we’ll be releasing PrimeFaces 3.5.3 and PrimeFaces Mobile 0.9.4 this week!

Posted in JSF | 6 Comments
Apr 12

New MenuModel

MenuModel API is used to create PrimeFaces menu components like menu, tieredMenu, menubar programmatically. This is a very useful feature since in many cases application menus are not static and vary depending on user roles.

Current MenuModel implementation is however is not a real model unlike other PrimeFaces Models and can be considered as a workaround. It uses UIComponent instances directly and manipulates JSF Component Tree directly whereas a proper model should be composed of POJOs and the component should render the UI based on the POJOs. Current implementation also has a couple of limitations, most famous one is the “Cannot remove the same component twice” error because you can only use MenuModel with request scoped beans, otherwise it is likely to receive this error.

For 4.0, we have reimplemented MenuModel from scratch using best practices and it is significantly improved regarding usability, performance and memory usage. Highlights of the new MenuModel are;

  • Lightweight
  • Based on simple pojos
  • Easy to extend
  • Easy to persist in a data storage
  • Can be used with any scope

Here is a sample implementation;

<p:menu model="#{menuBean.model}" />
public class MenuBean {

	private MenuModel model;

	public MenuBean() {
		model = new DefaultMenuModel();

		//First submenu
        DefaultSubMenu firstSubmenu = new DefaultSubMenu("Dynamic Submenu");

        DefaultMenuItem item = new DefaultMenuItem("External");
		item.setUrl("http://www.primefaces.org");
        item.setIcon("ui-icon-home");
		firstSubmenu.addElement(item);

        model.addElement(firstSubmenu);

		//Second submenu
		DefaultSubMenu secondSubmenu = new DefaultSubMenu("Dynamic Actions");

		item = new DefaultMenuItem("Save");
		item.setIcon("ui-icon-disk");
        item.setCommand("#{menuBean.save}");
        item.setUpdate("messages");
		secondSubmenu.addElement(item);

        item = new DefaultMenuItem("Delete");
        item.setIcon("ui-icon-close");
        item.setCommand("#{menuBean.delete}");
        item.setAjax(false);
        secondSubmenu.addElement(item);

        item = new DefaultMenuItem("Redirect");
        item.setIcon("ui-icon-search");
        item.setCommand("#{menuBean.redirect}");
		secondSubmenu.addElement(item);

        model.addElement(secondSubmenu);
	}

	public MenuModel getModel() {
		return model;
	}
}

There are two built-in implementations; DefaultMenuModel should be preferred if your model is static and do not change once built and DynamicMenuModel is for models that are likely to change during the flow.

Development time of the new model took 4 days and it is really worth it, we have already fixed-closed various reported issues on old MenuModel which can’t be fixed without a reimplementation. New MenuModel will be available in upcoming PrimeFaces 4.0.

Posted in JSF | 9 Comments
Apr 10

PrimeFaces 3.4.5 Released

We are glad to announce a new maintenance release for 3.4 series. This release brings 5 filed improvements for 3.4.x;

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 who are on 3.4.x, need to build/maintain their own PrimeFaces Builds by referencing the changes from public trunk aka 4.0-SNAPSHOT.

Next Elite Maintenance Release in line is 3.5.3 scheduled on early next week, 3.5.3 will bring regular maintenance and some useful features added in 4.0.

Posted in JSF | 2 Comments
Apr 10

Delta Theme

We are glad to share a new Theme with PrimeFaces Community. Delta is a light and clean theme created by Kiandra IT, ported as a PrimeFaces Theme. Along with regular color theming, components like calendar, dialog, slider and tabview have exclusive styling in Delta.

We have announced Elite Themes recently however Delta is a Community Theme available to everyone free and open source. It will be released in upcoming Themes 1.0.10 release. Demos will be up after the release as well.

Stay tuned for more theme goodness, there will be a cool new community theme and our designer will start working on Elite Themes soon.

Always bet on Prime!

Posted in JSF | 8 Comments
Apr 09

AutoComplete Caching and Empty Message

AutoComplete is a popular component in PrimeFaces and we keep working on to improve it. There are two new features we would like to share;

Caching

When new cache attribute is enabled, autocomplete will cache previous server based suggestions on client side and if same query is provided, it will return the data from cache. There is also a cacheTimeout feature defined in milliseconds to automatically clear cache to clear up memory. This feature is extremely useful to reduce load on server.

Empty Message

When there are no records found to suggest, by default autocomplete just does nothing. In case you’d like to provide a feedback to the user, you can provide your own message using emptyMessage attribute and autoComplete will display it instead.

These two nice enhancements will be in next week’s 3.5.3 release for ELITE and PRO Users, Community users can access these features from public trunk aka 4.0-SNAPSHOT and merge with their forks if required.

Posted in JSF | 3 Comments
Apr 08

Dialog Focus Enhancement

The first enabled input field in a dialog receives focus automatically by default already and we have added an enhancement to make this customizable. The main reason to use this feature can be explained with an example;

If we use a calendar field as the first input field in the dialog, the calendar field receives focus on show and popup shows automatically without user interaction. Built-in focus feature can be used to prevent these kinds of problems where we can just add the focus attribute on the dialog component to use it as indicated below. Notice that focus is set to savebtn button implicitly so when the dialog gets displayed, button will receive focus. This is quite useful since for readonly dialogs, hitting enter key would hide the dialog easily.

<h:form>
 <p:commandButton value="Show" onclick="dlg.show();" type="button" icon="ui-icon-extlink"/>

 <p:dialog id="dialog" header="Dynamic Focus" focus="savebtn" widgetVar="dlg">

    <h:panelGrid columns="2" cellpadding="5">

        <h:outputLabel for="name" value="Name:" />
        <p:inputText id="name" label="name" />

        <h:outputLabel for="surname" value="Surname:" />
        <p:inputText id="surname" label="surname" />

        <h:outputLabel for="telephone" value="Telephone:" />
        <p:inputText id="telephone" label="telephone" />

     </h:panelGrid>

     <p:commandButton id="savebtn" value="Save" oncomplete="dlg.hide()"/>

 </p:dialog>

</h:form>

This feature will be available in 3.5.3 and 4.0 releases.

Posted in PrimeFaces | 4 Comments