Skip to main content

Basic List

Minimal example for use of list plugin

cars.recipe.json
{
"name": "cars",
"type": "CORE:UiRecipe",
"description": "List of cars",
"plugin": "@development-framework/dm-core-plugins/list",
"config": {
"type": "PLUGINS:dm-core-plugins/list/ListPluginConfig",
"headers": [
"name",
"color",
"model"
]
}
}
CarList.blueprint.json
{
"name": "CarList",
"type": "dmss://system/SIMOS/Blueprint",
"attributes": [
{
"name": "type",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string"
},
{
"name": "name",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string"
},
{
"name": "cars",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "./Car",
"dimensions": "*"
}
]
}
Car.blueprint.json
{
"name": "Car",
"type": "CORE:Blueprint",
"description": "",
"attributes": [
{
"name": "type",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string",
"optional": false
},
{
"name": "name",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"label": "Manufacturer"
},
{
"name": "model",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"label": "Model"
},
{
"name": "color",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"label": "Color",
"optional": true
}
]
}
cars.entity.json
{
"type": "./CarList",
"cars": [
{
"_id": "volvo-in-car-list",
"name": "Volvo",
"type": "./Car",
"color": "White",
"model": "XC40"
},
{
"_id": "audi-in-car-list",
"name": "Audi",
"type": "./Car",
"color": "Black",
"model": "A2"
},
{
"_id": "bmw-in-car-list",
"name": "BMW",
"type": "./Car",
"color": "Blue",
"model": "X1"
}
]
}