Smart Data Source

The Smart Data Source component provides access for CRUD operations to business enttiies on the application server.

Sample markup

<smart-data-source 
    smart-filter-source='salesrepFilter'
    smart-object-name='salesrepDataSource' 
    smart-business-entity-name="Consultingwerk.SmartComponentsDemo.OERA.Sports2000.SalesRepBusinessEntity"
    smart-entity-table="eSalesrep"
    smart-navigation-source="salesrepToolbar">
</smart-data-source>
<smart-data-source 
    smart-object-name='customerDataSource' 
    smart-data-source='salesrepDataSource'  
    smart-foreign-fields='SalesRep,SalesRep' 
    smart-business-entity-name="Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity" 
    smart-entity-table="eCustomer" 
    smart-entity-view="eSalesrep" 
    smart-navigation-source="customerToolbar" 
    [smart-sort]="[{ field: 'Name', dir: 'asc' }, { field: 'CustNum', dir: 'asc' }]" 
    [smart-filter]="[{ field: 'Country', value: 'USA', operator: 'eq'}]" 
    smart-filter-source="customerFilter"> 
</smart-data-source>

Description

AttributeDescription
smart-object-nameThe unique identifier used by the Data Source Registry to serve instances of the Smart Data Source
smart-data-sourceOptional attribute that 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-foreign-fieldsTo 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-business-entity-nameThe name of the business entity that the Smart Data Source will serve.
smart-entity-tableThe name of the business entity table managed by this smart-data-source instance.
smart-entity-viewOptional attribute for setting the business entity table view (additional tables joined to the smart-entity-table)
smart-navigation-sourceOptional 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-filter-sourceOptional 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-sortOptional attribute used for setting the initial sort configuration of the data source
smart-filterOptional attribute used for setting the data source's initial filter. If set, all subsequent filters will be appended to the filter configured using this attribute.

use-initial-values

Optional attribute. If set to true, when adding a new record, the Smart Data Source will set initial (default) values for the new record by calling into the Business Entities's GetInitialValues invokable method.
smart-server-side-filteringOptional attribute. If set to false, the Smart Data Source will perform client side filtering. The default value is true.