Options
All
  • Public
  • Public/Protected
  • All
Menu

The options that can be passed to AJAX calls made by PrimeFaces. Note that you do not have to provide a value for all these property. Most methods methods such as PrimeFaces.ab have got sensible defaults in case you do not.

Hierarchy

  • Configuration

Index

Properties

async: boolean

If true, the the request is sent immediately. When set to false, the AJAX request is added to a global queue to ensure that only one request is active at a time, and that each response is processed in order. Defaults to false.

delay: number

Delay in milliseconds. If less than this delay elapses between AJAX requests, only the most recent one is sent and all other requests are discarded. If this option is not specified, no delay is used.

event: string

The AJAX behavior event that triggered the AJAX request.

ext: Partial<ConfigurationExtender>

Additional options that can be passed when sending an AJAX request to override the current options.

formId: string

A PrimeFaces client-side search expression (such as @widgetVar or @(.my-class) for locating the form to with the input elements that are serialized. If not given, defaults to the enclosing form.

fragmentId: string

Additional search expression that is added to the process option.

global: boolean

Whether this AJAX request is global, ie whether it should trigger the global <p:ajaxStatus />. Defaults to true.

ignoreAutoUpdate: boolean

true if components with <p:autoUpdate/> should be ignored and updated only if specified explicitly in the update option; or false otherwise. Defaults to false.

oncomplete: CallbackOncomplete

Callback that is always called after the request completes, irrespective of whether it succeeded or failed.

Callback that is called in case any error occurred during the request, such as a a network error. Note that this is not called for errors in the application logic, such as when bean validation fails.

Callback that is called before the request is sent. Return false to cancel the request.

Callback that is called when the request succeeds.

params: RequestParameter<string, unknown>[]

Additional parameters that are passed to the server. These can be accessed as follows:

final String myParam = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("myParam");
partialSubmit: boolean

true to perform a partial submit and not send the entire form data, but only the processed components; or false to send the entire form data. Defaults to false.

partialSubmitFilter: string

A CSS selector for finding the input elements of partially processed components. Defaults to :input.

process: string

A (client-side) PrimeFaces search expression for the components to process in the AJAX request.

promise: Promise<ResponseData<PrimeFacesArgs>>

A promise object that is resolved when the AJAX request is complete. You can use this option to register a custom callback. Please note that usually you do not have to set this option explicitly, you can use the return value of PrimeFaces.ab or PrimeFaces.ajax.Request.handle. It will create a new promise object when none was provided, and return that.

resetValues: boolean

true if the AJAX request is a reset request that resets the value of all form elements to their initial values, or false otherwise. Defaults to false.

skipChildren: boolean

true if child components should be skipped for the AJAX request, false otherwise. Used only by a few specific components.

source: string | HTMLElement | JQuery<HTMLElement>

The source that triggered the AJAX request.

timeout: number

Set a timeout (in milliseconds) for the request. A value of 0 means there will be no timeout.

update: string

A (client-side) PrimeFaces search expression for the components to update in the AJAX request.

Generated using TypeDoc