Enumeration
All data source status is here, including data source instance status and data status (for QueriableDataSource).
- Instance status includes: NotCreated, Created, CreateError. <br/>When a data source is requested to be created, it is set to
NotCreated
at first. If a data source has never been used, there is no data source status. - Data status includes: NotReady, Unloaded, Loading, Loaded, LoadError. <br/>When a QueriableDataSource is created, it is set as
NotReady
orUnloaded
at first. If the data source is generated by widgets, the initial status will beNotReady
, otherwise the initial status will beUnloaded
. When widgets are ready to generate data, that is to say, the data source is ready to do query, widgets will change the status fromNotReady
toUnloaded
. When widgets are not ready to generate data, widgets will change the status back toNotReady
, then framework will help to clear source records, records and cache in data source instance. Ifload()
is invoked, it will be set asLoading
. If data is returned, it will be set asLoaded
. If an error occurs, it will be set asLoadError
.
Enumeration Members
Enumeration member | Value | Notes |
---|---|---|
CreateError | "CREATE_ERROR" | |
Created | "CREATED" | |
LoadError | "LOAD_ERROR" | |
Loaded | "LOADED" | |
Loading | "LOADING" | |
NotCreated | "NOT_CREATED" | |
NotReady | "NOT_READY" | NotReady is for widget output data source only. When output data source instance is created, the data is not ready for use. Widget should dispatch an action (DataSourceStatusChanged) to make the data source ready for use. If a data source status is not ready, the query should return an empty result. |
Unloaded | "UNLOADED" |