Page Data
Last updated
Was this helpful?
Last updated
Was this helpful?
The sample application contains one page called index.html
and exists in the root of the project directory.
The page data module handles the data access concerns for the page. In the sample application, the page data module for the index.html
page is index.data.js
.
The data module defines a object called datasource
that is used to query databases using the query service.
Properties on the object are bound to UI components in the . If values are set on the object, they will be set in their respective components by default when the page loads. See for setting the data source configuration Provider
attributes when working with the query service.
The getEntities
method on the page data module uses a data source method to retrieve a list of tables and views in the source database per the connection details entered in the UI and set on the datasource
object.
The getSampleDataSet
method on the page data module returns a dataset that uses the datasource
and includes a query for the top N
records from an entity
that is passed in as a parameter the the method. This dataset is used as the data binding for the grid on the page controller module.