JET Dynamic UI Variable Types
These 'specific' variable types, specific to each JET metadata provider type, hide the 'factory' detail from the declaration.
Note:
The (requireJS) prefix 'oj-dynamic' must be mapped to the root of the components/providers. Typically, this would be done using the declarative "requirejs" syntax in app-flow.json.
There is no "options" property; all properties are top-level "defaultValue" properties.
Binding Syntax
The binding for these variables is different than typical Visual Builder variables; each of these variables expose the JET metadata provider as a 'provider' property of the variable.
For example, see the "metadata" attribute below:
<oj-dynamic-form id="myForm" class="oj-flex-item oj-sm-12 oj-md-12"
value="{{$page.variables.formData}}"
metadata="[[$page.metadata.activities.provider]]">
vb/DynamicLayoutMetadataProviderDescriptor
The following parameters are mutually exclusive:
Parameter | Description |
---|---|
endpoint | A standard Visual Builder endpoint ID, in the form of <service ID> / <operationID>, in an OpenAPI3 document with appropriate JSON Schema type information. |
path | A path to a JSON file, which contains a (JET-defined) JSON descriptor for the data. |
"metadata": {
"employee": {
"type": "vb/DynamicLayoutMetadataProviderDescriptor",
"defaultValue": {
"endpoint": "sales/getAllSales"
}
},
"department": {
"type": "vb/DynamicLayoutMetadataProviderDescriptor",
"defaultValue": {
"path": "dynamicLayouts/some/path",
"operationId": "get_Chickens",
}
}
}
vb/ContainerMetadataProviderDescriptor
There is no defaultValue
.
"metadata": {
"myContainerLayoutVar": {
"type": "vb/ContainerMetadataProviderDescriptor"
},
vb/HeterogeneousMetadataProviderDescriptor
Parameter | Description |
---|---|
discriminator | The field in the data that contains the options that can be used to determine which metadata provider to use for each new provider. |
"metadata": {
"incidentsProvider": {
"type": "vb/HeterogeneousMetadataProviderDescriptor",
"defaultValue": {
"discriminator": "discriminatorField"
}
}
},
vb/ServiceMetadataProviderDescriptor
Parameter | Description |
---|---|
endpoint | A standard VB endpoint ID, in the form of <service ID> / <operationID>, in an OpenAPI3 document with appropriate JSON Schema type information. |
"metadata": {
"employee": {
"type": "vb/ServiceMetadataProviderDescriptor",
"defaultValue": {
"endpoint": "sales/getAllSales"
}
}
}
vb/JsonMetadataProviderDescriptor
Requires that 'oj-dynamic' prefix be (requireJS) mapped to the root of the Dynamic UI Components.
The following parameters are mutually exclusive:
- path - path to a JSON file
- data - a (JS) object
"metadata": {
"employee": {
"type": "vb/JsonMetadataProviderDescriptor",
"defaultValue": {
"path": "path/to/some.json"
}
}
}