Download PrimeFaces ShowCase

It’s been frequently asked on PrimeFaces Forum to make prime-showcase demo available for download. Well, it is now :)

http://repository.prime.com.tr/org/primefaces/prime-showcase/1.0.0-SNAPSHOT/

We’ll never release it so the version will always be 1.0.0-SNAPSHOT however the war file will be deployed periodically to include updates. Also java sources are added to war package.

Posted in Developer, Java, PrimeFaces. Comments Off

JSF Spinner

0.9.0 version of PrimeFaces introduces a new spinner component. Spinner uses increment and decrement buttons to provide a numerical input.

spinner

Integers

In it’s simplest form spinner steps by 1 so it’s suitable for integer values.

<p:spinner value="#{bean.number}" />

Decimals

Floating numbers are also supported using the stepFactor attribute. Following spinner will increment or decrement by 0.25.

<p:spinner value="#{bean.number}" stepFactor="0.25"/>

Online Demo

See the online demo for the examples I’ve given here in action.

PrimeFaces 0.9.0 is released

After two months of hard work I finally managed to release the 0.9.0 version of PrimeFaces UI. UI 0.9.0 is a major release containing many new features, improvements and bug fixes. Significant changes of this release are;

  • Major improvements to the Ajax Framework
  • New component : FileUpload (Single-Multiple uploads, progress racking, customizable ui)
  • New component : DynamicImage (Display binary images)
  • New component : FileDownload (Present binary content as downloadable)
  • New component : Spinner (Numeric input)
  • New component : Rating (Star based rating)
  • New component : IdleMonitor (Monitor user activity)
  • New component : LightBox (A JSF LightBox)
  • New component : ImageSwitcher (A gallery of image effects)
  • New component : DataExport (Export datatable as Excel, PDF, CSV and XML)

See the full changelog of UI 0.9.0 here. Also updated the reference documentation which has reached 200 pages now. So what’s next? Current plans are adding layout and drag&drop components for 0.9.1.  Let’s see how it goes.

Faces of Faces

This is the second time I made JavaOne with a picture on a slide, previous one was Faces of MyFaces. This one is from Ed Burns’s presentation at JavaOne on JSF 2.

TS-4640_BURNS_KITAIN_JSF2

jQuery effects in JSF

PrimeFaces effect component encapsulates jquery effects using the effect component. Basically effect component is nested as a child inside a parent component;

For example;

<p:panel header="Explode">
    <h:outputText value="click" />
<p:effect type="explode" event="click" >
</p:panel>

Parent component above is the primefaces panel, when the panel is clicked it explodes, Boooooom!

Animation Configuration

Effect parameters are supplied via the f:param tags, any number of parameters can be supplied with this way.

<p:panel header="Scale">
	<h:outputText value="click" />
<p:effect type="scale" event="click">
	        <f:param name="percent" value="90" />
       </p:effect>
</p:panel>

Effect Target

By default, effects are applied to the parent component, there may be cases where parents are used to trigger animations on another component, suppose you click a link and image comes up with an animation. This can be implemented as;


<h:outputLink id="lnk" value="#">
    <h:outputText value="Show the Barca Temple" />
<p:effect type="puff" event="click" for="img" />
</h:outputLink>

<h:graphicImage id="img" value="/ui/barca/campnou.jpg" style="display:none"/>

When the “lnk” link is clicked, image is displayed with the appear effect.

Online Demo for examples

Examples I gave here can be seen in action at online demo of PrimeFaces.

Posted in Developer, Java, PrimeFaces. Comments Off