Rules of Optimization: Rule 1: Don't do it. Rule 2 (for experts only): Don't do it yet.

In case you need to execute a method on a backing bean, define a listener;
<h:inputText id="counter">
<p:ajax update="out" listener="#{counterBean.increment}"/>
<h:outputText id="out" value="#{counterBean.count}" />
public class CounterBean {
private int count;
public int getCount() {
return count;
public void setCount(int count) {
this.count = count;
public void increment() {
Default client side events are defined by components that support client behaviors, for input
components it is onchange and for command components it is onclick. In order to override the dom
event to trigger the ajax request use event option. In following example, ajax request is triggered
when key is up on input field.
<h:inputText id="firstname" value="#{bean.text}">
<p:ajax update="out" event="keyup"/>
<h:outputText id="out" value="#{bean.text}" />
Partial Processing
Partial processing is used with process option which defaults to @this, meaning the ajaxified
component. See section 5 for detailed information on partial processing.

  What is PrimeFaces?

  • Setup

  •   Download
      Hello World

  • Component Suite

  •   AccordionPanel
      Getting Started with Accordion Panel
      Dynamic Content Loading
      Client Side Callbacks
      Ajax Behavior Events
      Multiple Selection
      Client Side API
      Getting Started with AutoComplete
      Minimum Query Length
      Ajax Behavior Events
      Getting Started with Button
      Getting Started with Calendar
      Client Side API
      Getting Started with Carousel
      Content Display
      Getting started with PieChart
      Getting started with LineChart
      Getting Started with Bar Chart
      Getting started with DonutChart
      Getting started with BubbleChart
      Getting started with OhlcChart
      Getting started with MeterGaugeChart
      Skinning Charts
      Charting Tips
      Color Picker
      Getting started with CommandButton
      Client Side API
      Getting Started with CommandLink
      Getting started with ConfirmDialog
      Data Components
      Dashboard Model API
      Ajax Pagination
      Client Side API
      Getting started with the DataList
      Getting started with the DataTable
      Row Selection
      Lazy Loading
      Ajax Behavior Events
      Getting started with the Dialog
      Ajax Behavior Events
      Custom Toolbar
      Getting started with Fieldset
      Getting started with FileUpload
      Map Controls

  • Partial Rendering and Processing

  •   Partial Rendering
      Notifying Users

  • PrimeFaces Mobile

  • PrimeFaces Push

  •   Setup

  • Javascript API

  •   PrimeFaces Namespace

  • Themes

  •   Applying a Theme
      How Themes Work

  • Utilities

  •   RequestContext
      EL Function

  • Portlets

  •   Dependencies

  • Integration with Java EE

  • IDE Support

  • Project Resources

  • FAQ