Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.

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:inputText>
<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() {
count++;
}
}
 
Events
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:inputText>
<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
      Dependencies
      Configuration
      Hello World

  • Component Suite

  •   AccordionPanel
      Getting Started with Accordion Panel
      Dynamic Content Loading
      Client Side Callbacks
      Ajax Behavior Events
      Multiple Selection
      AjaxBehavior
      Listener
      AjaxStatus
      Events
      Client Side API
      Attributes
      Getting Started with AutoComplete
      Minimum Query Length
      Ajax Behavior Events
      BlockUI
      Skinning
      Tips
      Getting Started with Button
      Attributes
      Getting Started with Calendar
      Effects
      Client Side API
      Themes
      Getting Started with Carousel
      Content Display
      Tips
      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
      Skinning
      Column
      Columns
      CommandButton
      Getting started with CommandButton
      Client Side API
      Getting Started with CommandLink
      Getting started with ConfirmDialog
      ContextMenu
      Data Components
      State
      Dashboard Model API
      PageOnly
      DataGrid
      Ajax Pagination
      Client Side API
      Getting started with the DataList
      DataTable
      Getting started with the DataTable
      Sorting
      Row Selection
      RowKey
      Scrolling
      Lazy Loading
      Ajax Behavior Events
      DefaultCommand
      Getting started with the Dialog
      Ajax Behavior Events
      Drag&Drop
      Droppable
      onDrop
      Dock
      Editor
      Custom Toolbar
      Effects
      FeedReader
      Getting started with Fieldset
      FileDownload
      FileUpload
      Getting started with FileUpload
      Focus
      Galleria
      GMap
      Map Controls
      GMapInfoWindow
      GraphicImage
      Growl
      HotKey
      IdleMonitor
      ImageCompare
      ImageCropper
      ImageSwitch
      Inplace
      InputMask
      InputText
      InputTextarea
      Keyboard
      Layout
      LayoutUnit
      LightBox
      Log
      Media
      MegaMenu
      Menu
      Menubar
      MenuButton
      MenuItem
      Message
      Messages
      NotificationBar
      OrderList
      OutputPanel
      OverlayPanel
      Panel
      PanelGrid
      Password
      PhotoCam
      PickList
      Poll
      Printer
      ProgressBar
      Push
      RadioButton
      Rating
      RemoteCommand
      Resizable
      Ring
      Row
      RowEditor
      RowExpansion
      Schedule
      ScrollPanel
      SelectBooleanButton
      SelectBooleanCheckbox
      SelectChecboxMenu
      SelectManyButton
      SelectManyCheckbox
      SelectManyMenu
      SelectOneButton
      SelectOneListbox
      SelectOneMenu
      SelectOneRadio
      Separator
      Sheet
      Slider
      Spacer
      Spinner
      SplitButton
      Submenu
      Stack
      SummaryRow
      TabView
      TagCloud
      Terminal
      ThemeSwitcher
      Toolbar
      ToolbarGroup
      Tree
      TreeNode
      TreeTable
      Watermark
      Wizard

  • Partial Rendering and Processing

  •   Partial Rendering
      Notifying Users
      Keywords

  • PrimeFaces Mobile


  • PrimeFaces Push

  •   Setup
      Samples

  • 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





  • affiliate_link