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
Attribute | Description |
---|---|
smart-object-name | The unique identifier used by the Data Source Registry to serve instances of the Smart Data Source |
smart-data-source | Optional 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-fields | 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-business-entity-name | The name of the business entity that the Smart Data Source will serve. |
smart-entity-table | The name of the business entity table managed by this smart-data-source instance. |
smart-entity-view | Optional attribute for setting the business entity table view (additional tables joined to the smart-entity-table) |
smart-navigation-source | 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-filter-source | 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-sort | Optional attribute used for setting the initial sort configuration of the data source |
smart-filter | Optional 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-filtering | Optional attribute. If set to false, the Smart Data Source will perform client side filtering. The default value is true. |