Read-only field component
Use the Read-only field component to display the component data. Before you use the component, make sure that the viewModelConfig schema section includes the attribute bound to the Read-only field component.
View the example that adds an attribute to the Freedom UI page schema below.
{
"viewModelConfig": {
"attributes": {
"SomeAttribute": {
"modelConfig": {
"path": "PDS.Title"
},
"name": "SomeAttribute"
}
}
}
}
Mobile Creatio lets you display the text, lookup, double, integer, date, boolean, phone, email, web, rich text, and color Read-only field component types.
View the example of a configuration object that displays data below.
{
"type": "crt.ViewField",
"value": "$SomeAttribute",
"maxLines": 2,
"label": {
"visible": true,
"value": "Title",
"position": "left"
},
"launchConfig": {
"name": "ConfigurationOptionalName",
"type": "phone",
"bindingColumn": "CommunicationType",
"binding": {
...
},
}
}
string type
Component type. crt.ViewField for the Read-only field component.
string value
The name of attribute from the viewModelConfig schema section.
number maxLines
Maximum number of lines in the component to display.
object label
The component title. If you omit a value, Mobile Creatio displays the DataSchemaAttribute.caption property value.
Parameters
Name | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
boolean visible | The flag that makes the component label visible. By default, true The component label is visible. false The component label is not visible. | ||||||||
string value | The label value. By default, the title is the same as the title of the corresponding model field. | ||||||||
string position | The label position. By default, left Display the label to the left of the component. right Display the label to the right of the component. top Display the label above the component. bottom Display the label below the component. |
object launchConfig
Add link to the component. If you omit the type property, Creatio analyzes the values of the binding and bindingColumn properties. The bindingColumn property configures the content provider launched based on the value set in the binding property.
Parameters
Name | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
string name | Link name. | ||||||||
string type | Link type. phone Mobile Creatio opens the dialer app. email Mobile Creatio opens the email client. map Mobile Creatio opens the map app. uri Mobile Creatio opens an arbitrary link. | ||||||||
string bindingColumn | Name of the column that determines the type of opened link. | ||||||||
object binding | Record ID that determines the type of opened link. |