May 18

New Component: OutputLabel

We are currently working on latest bits of the maintenance work before PrimeFaces 3.3.RC1 release so focused on bug fixes instead of new features but there is one feature we couldn’t resist to add called PrimeFaces OutputLabel. It extends standard outputLabel with various features. The sources of the feedback for this component are our own ideas plus pe:requiredLabel component that belongs to PrimeFaces Extensions project.

  • OutputLabel sets its value as the label of the target component to be displayed in validation errors so that target component does not need to define label attribute again.
  • Support for components with non-trivial markup like spinner, autocomplete, calendar and so on which are not supported by standard outputLabel.
  • Theme aware error styling when associated component is not valid.
  • Required field indicator to display if target input component is required.

See this new component in action at PrimeFaces Labs.

Posted in Uncategorized | 9 Comments
May 01

Build PrimeFaces Online

PrimeFaces Community member Peter Hendriks has created a great tool to build PrimeFaces from trunk source. With just one click, you can build the very latest PrimeFaces and download it as a jar. We also have plans to bring jenkins back but that’s for future.

http://www.case1.nl/pfnb/

Thank you Peter for taking the time to do this and share with the rest of the community!

Posted in PrimeFaces | 9 Comments
Apr 25

Menu Enhancements

PrimeFaces 3.3 gets major menu component enhancements, most of the work is related to internal apis and refactoring. We’ve unified repetitive behaviors like tiered menus, overlay positioning by introducing client side inheritance.

External changes are;

- Tiered and Slide menu types have now their own components named tieredMenu and slideMenu.
- Added autoDisplay mode to tiered menus, by default submenus are displayed with mouseover, setting autoDisplay mode to false requires a click.
- Tiered Context Menus are now supported.
- Overlay slide and tiered menus are now supported.
- SlideMenu is a complete rewrite of menu with slide type.
- Menus are now not hidden when mouse is out from the submenus, we’ve aligned the behavior with OS menus and menubars to make this closer to common user experience.

Check out PrimeFaces Labs to see these in beta action!

http://www.primefaces.org/showcase-labs/ui/home.jsf

For those who wonder the release date of 3.3… let’s say when it is done ;) We are very busy with maintenance!

Posted in PrimeFaces | 13 Comments
Apr 10

Advanced AutoComplete Tooltip

PrimeFaces AutoComplete is an ajax input suggest component that is far more advanced than other similar JSF components and JS widgets you can find in JS libraries. It supports single, multiple selection, ajax behaviors, custom content, pojo support and more.

An Enterprise User of PrimeFaces required another sponsored feature to autocomplete; Displaying custom content as tooltip on mouseover of suggested items. After giving a though on how to do it, we came up with something like this;

Content of the tooltip is provided by itemtip facet. This is still beta code but cool enough to present.

See PrimeFaces Labs for the live demo!

Hint: Start with “A” :)

Posted in PrimeFaces | 15 Comments
Apr 09

Remaining Chars for InputTextarea

PrimeFaces InputTextarea extends standard inputTextarea component with theming, autogrow and cross browser maxlength constraint. Latest addition to this extension set is displaying number of characters left during typing.

To make things more flexible (as usual in PrimeFaces), we have added two new attributes;

- counter: Id of the output component to display remaining characters text.
- counterTemplate: Customizable template text like “{0} chars remaining! Use it wisely”

Check out PrimeFaces Labs to try it out!

Posted in PrimeFaces | 8 Comments
Apr 04

Star Rating Reimplemented

PrimeFaces Star Rating was based on a 3rd party plugin until now and we’ve decided to come up with our own for 3.3.

While on it, we’ve added a couple of more handy features;

- Improved quality of star icons
- Removed hover as it might be confusing
- Added readonly rendering, improved disabled rendering
- Added style and styleClass options and migrated css classes to PF conventions
- In addition to already existing “rate” ajax behavior event, “cancel” event is now also available.
- Added cancel attribute to define the visibility of cancel icon
- Fixed various problems regarding validations (e.g. required validation was failing)

Update demo is available at PrimeFaces 3.3 Labs.

PrimeFaces : Best JSF Component Suite on Earth until Chuck Norris creates one.

Posted in PrimeFaces | 3 Comments
Apr 03

FacesMessage Enhancements

PrimeFaces 3.3 brings handy features regarding displaying facesmessages. These features were already available in PrimeFaces Extensions Project with a different implementation and there was a popular community request to promote these ideas to PrimeFaces. Also during a team meeting last week, our consultants mentioned that they needed at least two of these during their work onsite for a client where they provide onsite assistance on PrimeFaces. Long story short, here are the 3 additions;

Targetable Messages

There maybe times where you need to target a FacesMessage to a specific component, for example suppose you have p:growl and p:messages on same page and you need to display some messages on growl, some on p:messages. We have added grouping defined via for attribute to implement these;

<p:messages for="somekey" />
<p:growl for="anotherkey" />
<p:growl globalOnly="true" />
context.addMessage("somekey", new FacesMessage(FacesMessage.SEVERITY_INFO,"Sample info message", "PrimeFaces Rocks"));
context.addMessage("somekey", new FacesMessage(FacesMessage.SEVERITY_INFO,"Sample info message", "Always bet on Prime"));

context.addMessage("anotherkey", new FacesMessage(FacesMessage.SEVERITY_INFO,"Sample info message", "PrimeFaces is developed by Chuck Norris"));

context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,"Sample warn message", "Optimus Prime will be back!"));

So first two messages will be displayed by messages, second one by first growl and last with second growl.

Severity Levels

Using severity attribute of messages components, you can defined which severities can be displayed by the component. So for instance, we are now able to display errors on messages and infos on a growl that fades out.

<p:messages severity="error" />
<p:growl severity="info, warn" />
<p:growl />  //default

Escaping

Until now message components, escape the html content in FacesMessage summary and detail, just set escape to false to display html inside messages.

context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,"Sample warn message", "PrimeFaces is developed by <strong>Chuck Norris!</strong>"));
<p:messages escape="false" />

That’s it! Hope you find these features handy, we’ve already started using targeting and severity levels in a project!

Posted in PrimeFaces | 13 Comments