/
Client-Side metadata loading

Client-Side metadata loading

Loading

In general the metadata loads once the user has been authenticated. The IMetadataService contains the Initialize method which triggers on the startup per default. If you want to prevent the loading of metadata on the startup and do it at a later stage yourself you can unregister the startup action with the symbol (MetadataStartupActionIdentifier).

The default target controller on the Web-API is api/v1/metadata/. This includes all classes and layouts available for the current application.

To register another url to query for metadata one can override the IUrlManager.getAllMetadataUrl and provide a different endpoint.

Logical Structure of the metadata tree

Metadata tree is structured like this:

[ MetaClass { Elements [ Layout { LayoutType (e.g. Detail, List) Elements } ] } Layouts [ MenuLayout ] ]

Structure in Detail

The metadata needs to have the following structure:

[ { "caption": "Type Value List", "name": "ReportsTypeValueList", "visible": true, "enabled": true, "controlName": null, "elements": [ { "caption": "Detail", "name": "Detail", "visible": true, "enabled": true, "controlName": null, "type": "Detail", "elements": [ { "caption": "Caption", "name": "Caption", "visible": true, "enabled": false, "path": "caption", "description": "Caption", "dataType": "Text", "writable": false, "required": false, "controlName": "MultiLineTextEditor", "defaultValue": "", "aspects": [] } ], "aspects": [] }, { "caption": "List", "name": "List", "visible": true, "enabled": true, "controlName": "List", "type": "List", "elements": [ { "caption": "Caption", "name": "Caption", "visible": true, "enabled": false, "path": "caption", "description": "Caption", "dataType": "Text", "writable": false, "required": false, "controlName": "MultiLineTextEditor", "defaultValue": "", "aspects": [] } ], "aspects": [] }, { "caption": "Title", "name": "Title", "visible": true, "enabled": true, "controlName": null, "type": "Title", "elements": [ { "caption": "Caption", "name": "Caption", "visible": true, "enabled": false, "path": "caption", "description": "Caption", "dataType": "Text", "writable": false, "required": false, "controlName": "MultiLineTextEditor", "defaultValue": "", "aspects": [] } ], "aspects": [] }, { "caption": "Search", "name": "Search", "visible": true, "enabled": true, "controlName": null, "type": "Search", "elements": [ { "caption": "Caption", "name": "Caption", "visible": true, "enabled": false, "path": "caption", "description": "Caption", "dataType": "Text", "writable": false, "required": false, "controlName": "MultiLineTextEditor", "defaultValue": "", "aspects": [] } ], "aspects": [] }, { "caption": "Drop Down", "name": "DropDown", "visible": true, "enabled": true, "controlName": null, "type": "DropDown", "elements": [ { "caption": "Caption", "name": "Caption", "visible": true, "enabled": false, "path": "caption", "description": "Caption", "dataType": "Text", "writable": false, "required": false, "controlName": "MultiLineTextEditor", "defaultValue": "", "aspects": [] } ], "aspects": [] } ], "aspects": [] } ]

 

Related content