JSDO properties, methods, and events reference : beforeFill event
  

beforeFill event

Fires on the JSDO before a call to the fill( ) method executes and sends a Read operation request to its Data Object resource.
Alias: beforeRead
Applies to: progress.data.JSDO class
The following parameters appear in the signature of any event handler (callback) function (or functions) that you subscribe to this event:

Syntax

function ( jsdo , request )
jsdo
A reference to the JSDO that is invoking the Read operation on the resource. For more information, see the description of the jsdo property of the request object.
request
A reference to the request object before the Read operation request is sent to the resource. For more information, see the description of the request object.
Application code can subscribe a callback to this event by invoking the subscribe( ) method on a JSDO instance.

Example

The following code fragment subscribes the callback function, onBeforeFill, to handle the beforeFill event fired on the JSDO, myjsdo:
/* subscribe to event */
myjsdo.subscribe( 'beforeFill', onBeforeFill );

myjsdo.fill();

function onBeforeFill ( jsdo , request ) {
    /* for example, do any preparation to receive data from the server */
};

See also:

afterFill event, fill( ) method, subscribe( ) method (JSDO class), unsubscribe( ) method (JSDO class)