You are here:
Binding
You can use the Binding to bind values from the
objects to the UI. Different binding modes are used to control the updating process of the
values in the UI and objects.
Required Editions
| Available in Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled. |
Attributes
These attributes are available for the Binding
element.
| Attribute | Description | Values | Required |
|---|---|---|---|
| target | Describes the actual UI element. | Depends on the UI element, that is, title, Info, Text, Image. | Yes |
| type | Defines how the resource is shown. | Info, Text, Label, Image. | Yes |
| binding | Source of the binding. | For example, "ProcessContext::luOrderItemMeta.text" | yes (no if target="DataSource" and the desired data source is a toggle -- see toggleId) |
| bindingMode | Binding mode used to control the updating process. | ONE_TIME, ONE_WAY, TWO_WAY | No, defaults to ONE_TIME |
| toggleId | Identifier of a domain. Note that domains are typically synchronized from the Web model via the <DomainRepository> contract. The corresponding target is often (but not always) "DataSource". If type="Dynamic", the toggleId is the data source attribute, which specifies the actual toggleId. If the actual type isn’t a domain, then the toggleId attribute in the corresponding data source record is empty. |
For example, "CountryState" for DomCountryState | No |
| format | Only applies if type="Decimal". Number of places both sides of the decimal. | [n].[n] | No |
| typeField | Applies to lists. If type="Dynamic", the typeField is the data source attribute, which specifies the actual type. | A data source attribute | No |
| minBinding | Applies to lists. If type="Dynamic", Indicates the field in the data structure that contains the minimum allowed value. Only used for date and numeric fields. | string | No |
| maxBinding | Applies to lists. If type="Dynamic". Indicates the field in the data structure that contains the maximum allowed value. Only used for date and numeric fields. | string | No |
| stepSizeBinding | Applies to lists. If type="Dynamic". Indicates the field in the data structure that contains the step size value. Only used for numeric fields. | string | No |
| formatBinding | Applies to lists. If type="Dynamic". Indicates the field in the data structure that contains the format information. | string | No |
| stepperEnabledBinding | Applies to lists. If type="Dynamic". Indicates the field in the data structure that contains the information, if the stepper controls are shown. Only used for numeric fields. | string | No |
| stepperCorrelationId | Applies to lists. Links the input areas of the two lists shown in the UI. | string | No |
bindingModes
| bindingMode | Description |
|---|---|
| ONE_WAY | Updates the value shown in the UI, if the value in the object changes. |
| TWO_WAY | Updates both (the value shown in the UI and the value in the object) if one of the values changes. |
| ONE_TIME | The value in the object is written once into the UI. Nothing is updated if one of the values changes. |
This code sample shows the usual XML syntax.
<Bindings>
<Bindingtarget="Value"binding="ProcessContext::luOrderItemMeta.text"bindingMode="TWO_WAY"/>
</Bindings>
