Bindable properties and functions
In this article, you will find all the properties and functions of the UI view which can be accessed using the @ character.
To escape the @ character, it must be doubled.
Example : Escaping the @ character.
Mail : user@@mail.com
UIViewName
Gets the UI view name.
Example :
<text>@UIViewName</text>
Description
Represents the UI view description.
Example :
<text>@Description</text>
Title
Represents the UI view title.
Example :
<text>@Title</text>
IsMain
Represents a value indicating whether the view model is the main view model.
For the following example, consider a UI view Order with a sub UI view OrderDetails.
Example :
<!-- This is the Order template, the main view model -->
<if condition="@IsMain">
<text>This is displayed because we are in the main view model context</text>
</if>
<context relation-property-name="OrderDetails">
<if condition="@IsMain">
<text>This is not displayed because we are in the subview context</text>
</if>
<datagrid />
</context>
CreationMode
Represents a value indicating whether the view has opened in creation mode.
This is the case for example when you navigate to a UI view after clicking on the add button of a toolbar.
Example :
<if condition="@CreationMode">
<text>This is displayed only if the current UI view is opened in creation mode</text>
</if>
Datasource
Represents the UI view datasource.
For the following example, consider a UI view Order with a CustomerName property.
Example :
<repeat values="@Datasource">
<text>
$Item.CustomerName
</text>
</repeat>
In this example, for each Order of the datasource, the value of CustomerName property will be displayed.
DatasourceCurrent
Represents the current item of the UI view datasource.
It can be used for example to display a property value for the current selected item.
For the following example, consider a UI view Order with a CustomerName property.
Example :
<text>The current selected order customer name is @DatasourceCurrent.CustomerName</text>
<datagrid />
In this example, when the user selects a line of the datagrid, the customer name of the selected order will be displayed.
Icon
Represents the icon of the UI view.
Warning
The icon management is a work in progress.
ParentViewModel
Represents the parent view model context.
For example, consider a UI view Order with a subview OrderDetails.
Example :
<!-- This is the Order template, the main view model -->
<context relation-property-name="OrderDetails">
<!-- ParentViewModel can be used in the OrderDetails context and represents Order view model -->
<text>@ParentViewModel.UIViewName</text> <!-- Displays "Order" -->
<datagrid />
</context>
Fields
Fields of the UI view can be accessed via @Fields.FieldName
For example, if a UI view Order has a field OrderTotal defined :
<input-number value="@Fields.OrderTotal" label="OrderTotal"/>
In this example, the field OrderTotal will be bound to a numeric input.
Computeds
Computeds of the UI view can be accessed via @Computeds.ComputedName
For example, if a UI view Order has a computed OrderTotal defined :
<input-number value="@Computeds.OrderTotal" label="OrderTotal"/>
In this example, the computed OrderTotal will be bound to a numeric input.
Resources
Device
Some characteristics of the device displaying the web application can be obtained via @Device.
See device article