.refresh()

Previous Next

Refreshes the current data set. All other data sets of the data source become invalidated, and will be requeried when viewed again.

Any inserted (but not committed) records will be moved to the current data set. Any gaps left by deleted (but not committed) records will be filled up.

Returns the 'this' object.

Syntax

.refresh( options )

 

options  ::=  {

      async:  async

,     current:  current

,     condition: condition

,     success:  success-function

,     error:  error-function

}

 

async      ::= { true | false }

current    ::= { true | false }

Options is a struct that can have the following items, all of which are optional.

Async is a boolean that specifies whether the operation is executed asynchronously (the default).

Condition is a search condition that identifies the subset of rows that you want to be refreshed. See Example 2. The result of this "refresh" action is that the client will have the same records and the same values in these records as the server. This is NOT the same as refreshing a subset of rows already present on the client; use the .refresh() function of the Rows object for that.

Current is a boolean that may be set to true to specify that only the currently shown data set must be refreshed. Otherwise (if current has the default value of true), the entire data source is refreshed.

Success-function is a function called after the data was processed on the client.

Success-function is a function called if an error occurs.

 

Example 1

$.udb('EMP').refresh();

 

Example 2

$.udb('EMP').refresh( condition: { BIRTHDAY: ">=01-JAN-1980" } );