src/ui/data-source/smart-datasource.component.ts
The Angular Component wrapper over the SmartDataSource. Used for providing a declarative way of initializing a SmartDataSource.
| changeDetection | ChangeDetectionStrategy.Eager |
| exportAs | smartDatasource |
| selector | smart-datasource,smart-data-source |
constructor(serviceAdapter: SmartServiceAdapter, registry: DataSourceRegistry, smartErrorHandler: SmartErrorHandlerService, toolbarRegistry: SmartToolbarRegistry, filterRegistry: SmartFilterRegistry, injector: Injector, route: ActivatedRoute, vcRef: ViewContainerRef)
|
|||||||||||||||||||||||||||
|
Parameters :
|
| after-delete |
Type : AfterEventCallback
|
|
Optional function that will be called after a delete operation. |
| after-save-changes |
Type : AfterEventCallback
|
|
Optional callback. If set, it will be called after a save changes operation. |
| before-delete |
Type : BeforeEventCallback
|
|
Optional function that will be called before a delete operation. |
| before-save-changes |
Type : BeforeEventCallback
|
|
Optional callback. If set, it will be called before a save changes operation. |
| data-requested |
Type : DataRequestedCallback
|
|
Optional function that will be called when the data source is fetching data. |
| get-initial-values |
Type : boolean
|
|
If set to true, when adding a new record, the Smart Data Source will set initial (default) values for the new record. |
| smart-active-on-pages |
Type : string
|
|
Only applies to child data sources. Takes a comma separated list of page keys as a value. If set, the child data source will be activated when the specified pages are active. |
| smart-auto-fetch |
Type : boolean
|
|
When set to false, prevents the Smart Data Source to auto fetch data when the filter or runtimeFilters have changed, or when a selection changed event has been fired by a parent Smart Data Source |
| smart-auto-select-first-record |
Type : boolean
|
|
Indicates whether the Smart Data Source should automatically select the first record after fetching data |
| smart-batch-size |
Type : number
|
|
The batch size to be used for the Smart Data Source. |
| smart-business-entity-name |
Type : string
|
|
The Smart Business Entity name, used for initializing the underlying JSDO |
| smart-data-source |
Type : string
|
|
Specifies the parent data source. If set, the data source will subscribe to to the parent data source and filter according to it's selection. To be used alongside the "smart-foreign-fields" attribute |
| smart-entity-table |
Type : string
|
|
The table that should be set as tableRef for the underlying JSDO |
| smart-entity-view |
Type : string
|
|
The JSDO table views |
| smart-filter |
Type : any
|
|
If set, the SmartDataSource will be initialized with this filter. |
| smart-filter-source |
Type : string
|
|
Optional attribute that takes the smart-object-name of a Smart Filter as a value. If set, the data source will append filters generated by the Smart Filter when it's filter button is clicked. |
| smart-foreign-fields |
Type : string
|
|
To be used alongside the "smart-data-source" attribute. It is used to specify the foreign key relation between the parent and the child data sources. |
| smart-navigation-source |
Type : string
|
|
Optional attribute that takes the smart-object-name of a Smart Toolbar as a value. If set, the data source will adjust it's selection when the specified toolbar's navigation buttons are clicked. |
| smart-partial-dataset |
Type : boolean
|
|
Deprecated no-op. Partial dataset handling is derived from the JSDO table reference root-table metadata. |
| smart-read-requests-cancellable |
Type : boolean
|
|
If set to true, ongoing read operations may be cancelled by using the cancelCurrentRequest() method. |
| smart-server-side-filtering |
Type : boolean
|
|
Determines if the Smart Data Source will perform server side filtering. The default value is true. |
| smart-server-side-sorting |
Type : boolean
|
| smart-sort |
Type : SortDescriptor[] | string
|
|
If set, the SmartDataSource will be initialized with these sort options. |
| smart-stop-after |
Type : number
|
|
The amount of time (in seconds) after which the data source will stop the current request. |
| smart-instance-name |
Type : string
|
|
The instance name of the component |
| smart-object-name |
Type : string
|
|
The object name of the component |
| on-ready |
Type : EventEmitter<SmartDataSource>
|
|
Fires when the SmartDataSource has been initialized. |
| selection-changed |
Type : EventEmitter<SelectionChangedEventArgs>
|
|
Fires when a selection change has occurred. |
| state-changed |
Type : EventEmitter<DataSourceStateChangeEventArgs>
|
|
Fires when the state of the SmartDataSource has changed. |
| Public fetch | ||||||||
fetch(query: IQuery)
|
||||||||
|
Parameters :
Returns :
void
|
| dataSource |
Type : SmartDataSource
|
|
The initialized SmartDataSource object. |
| beforeSaveChanges | ||||||
setbeforeSaveChanges(value: BeforeEventCallback)
|
||||||
|
Optional callback. If set, it will be called before a save changes operation.
Parameters :
Returns :
void
|
| dataRequested | ||||||
setdataRequested(value: DataRequestedCallback)
|
||||||
|
Optional function that will be called when the data source is fetching data.
Parameters :
Returns :
void
|
| beforeDelete | ||||||
setbeforeDelete(value: BeforeEventCallback)
|
||||||
|
Optional function that will be called before a delete operation.
Parameters :
Returns :
void
|
| afterDelete | ||||||
setafterDelete(value: AfterEventCallback)
|
||||||
|
Optional function that will be called after a delete operation.
Parameters :
Returns :
void
|
| afterSaveChanges | ||||||
setafterSaveChanges(value: AfterEventCallback)
|
||||||
|
Optional callback. If set, it will be called after a save changes operation.
Parameters :
Returns :
void
|
| stopAfter | ||||||
getstopAfter()
|
||||||
|
Returns :
number
|
||||||
setstopAfter(value: number)
|
||||||
|
The amount of time (in seconds) after which the data source will stop the current request.
Parameters :
Returns :
void
|
| parentDs | ||||||
getparentDs()
|
||||||
|
Returns :
string
|
||||||
setparentDs(value: string)
|
||||||
|
Specifies the parent data source. If set, the data source will subscribe to to the parent data source and filter according to it's selection. To be used alongside the "smart-foreign-fields" attribute
Parameters :
Returns :
void
|
| serverSideSorting | ||||||
getserverSideSorting()
|
||||||
|
Returns :
boolean
|
||||||
setserverSideSorting(value: boolean)
|
||||||
|
Parameters :
Returns :
void
|