Understanding partial page rendering (PPR)
PrimeFaces provides a generic partial page rendering (PPR) mechanism to update specific JSF components with AJAX.
PrimeFaces provides process, update
attributes to indicate which view components need to be processed or updated. Partial processing also provides some keywords which has some special meaning.
Sometimes, we may need to process the form partially based on the action triggered on the form. A very common scenario is, there can be multiple submit buttons in a form and you need to perform validations based on the action performed and ignore other field validations that are irrelevant to the action invoked.
For example, assume we are viewing a User Detail Form and we can update the user details or delete the user record using Update and Delete submit buttons. For updating, the user fields, userId
, userName
, and firstName
are mandatory where as for deleting, only userId
is required. So, when the Update button is clicked, validations should be performed on userId
, userName
, and firstName
fields. But when the Delete button is clicked, validations on userName
and firstName
should be skipped.