Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Use Mock-up Datasource

    Use Mock-up Datasource

    • 1. Summary
    • 2. Step by Step Guide
    • 2.1 Create the DSO
    • 2.2 Generating Entity, Fields and Grid from Mock-up DSO
    • 3. Documentation

    1. Summary

    A DataSource is used to populate data in components in Build.One like Grid / TableGrid / Table or Card ViewCard View , This data can be stored in a real Database or like in this case, in a JSON file. This is specially useful in the first drafts of a project, as sample data can be included and test how the application looks and feels.

    2. Step by Step Guide

    2.1 Create the DSO

    1. To start you need a json-file which holds your mock-up data, an example for customer data can be found here:
    2. MockUp Example.json0.8KB
    3. This json file must be included in the workspace, e.g. src/webui/assets/resources/mockdata/Customer_MockUp_example.json
      1. If not already there you can create that folder, but the folder must also be exposed. This could be done here src/webui/webpack/config/static.config.js by adding the following line export default [{ from: 'assets' }];
    4. After that you can create your DSO in the B1 UI and adjust the following attributes
      1. MockupData → Put in the path where to find the json-file, in our example this would be /resources/mockdata/Customer_MockUp_example.json
      2. SUBTYPE: MockupCollection
    5. Now you can use you DSO like a all the other DSOs

    2.2 Generating Entity, Fields and Grid from Mock-up DSO

    1. You can either create the Entity, Fields, Grids and Forms manually out of the Mock-up DSO or you use the build in tools. In case that you want to use the build in tools, continue with the next steps
    2. For creating Entities and Fields: Use the function Generate Entities & Datafields which you can find in the toolbar of Integrate -> Data -> Datasources
      1. Give it a Name, Description and Module
      2. Choose JSON as Definition Source Type
      3. Paste in your predefined json-file, make sure that there are no spaces in the parameters
      4. Click Ok and see success message
    3. For creating Forms and Grids you can use the Generate Function eighter in Design -> Components -> Grids or Design -> Components -> Forms

    3. Documentation

    To find more information and all the possibilities available, you can check the following documentation.

    Grid / TableGrid / Table

    DataSourceDataSource

    Back to Use CasesUse Cases

    Back to Home Page

    Logo