define(['ojs/ojdeferreddataprovider'], function(DeferredDataProvider) {
// Application should call API on DeferredDataProvider
})
Typescript Import Format
//This class is exported directly as module. To import it import DeferredDataProvider= require("ojs/ojdeferreddataprovider");
Generic Parameters
Parameter
Description
K
Type of Key
D
Type of Data
JET In Typescript
A detailed description of working with JET elements and classes in your typescript project can be found at:
JET Typescript Usage.
Final classes in JET
Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.
Description
This class implements oj.DataProvider.
This object represents a data provider that is created with deferred data and can be used by any component that requires a data provider that will be created with data from a Promise.
Constructor
new DeferredDataProvider(dataProvider, capabilityFunc)
Return the total number of rows in this dataprovider
Returns:
Returns a Promise which resolves to the total number of rows. -1 is unknown row count.
Type
Promise.<number>
isEmpty() : {"yes"|"no"|"unknown"}
Return a string that indicates if this data provider is empty
Returns:
a string that indicates if this data provider is empty. Valid values are:
"yes": this data provider is empty.
"no": this data provider is not empty.
"unknown": it is not known if this data provider is empty until it has resolved, and a fetch is made.