Other adjustments

Translations

If translations are maintained in the system, you can specify a key in three curly brackets for the "name" (e.g. {{Field.Adresse.adrnr}}). The framework will then automatically translate the name into the user language. If a language is not translated, the area is left empty.

Furthermore, various translations can be integrated into the component. To do this, an object is added to an object under "objects" that has the properties "name" and "data". "name" is assigned the value "translations" and "data" is assigned an object from any number of key-value pairs. The key is used as a variable within the component.

Example

"name" : "translations",
"data":{
"Standard.Neu": "{{{Standard.Neu}}}",
"Standard.Editieren": "{{{Standard.Editieren}}}",
"Standard.Loeschen": "{{{Standard.Loeschen}}}",
"Standard.Add": "{{{Standard.Add}}}"
}

Templates

The "Kendo UI Templates" provide an easy-to-use, powerful JavaScript templating engine within the Kendo UI Toolkit. This allows many (sub-) components to be dynamically customized so that the (sub-) components behave dynamically.

You can find more info here.

Examples

In this example, a different icon is installed depending on the value:

"# if(data.GEPLANT == 1) {#
<div class='grid-icon-custom-center' style='color:green'><i class='fal fa-check'></i></div>
#} else {#
<div class='grid-icon-custom-center' style='color:red'><i class='fal fa-times'></i></div>
#}#"

Here the value is parsed into "ENDEIST":

"#= kendo.toString(kendo.parseDate(ENDEIST), 'd') #"

Page- and browser text

With "objects" the page header and the browser text can be adjusted individually and dynamically. The objects with the properties "name" and "data" are used for this. In "name" is either "browserTitle" or "pageTitle" and in "data" is the text that should be visible. Here you can indicate translations in three curly brackets. Expressions can also be entered, but then they must be specified in two curly brackets.

{
"name": "browserTitle",
"data": "{{{WebSMS.Title.ProjectEditing}}} {{entity.IsNew ? '': ' - ' + entity.Projnr}}"
},
{
"name": "pageTitle",
"data": "{{{WebSMS.Title.ProjectEditing}}} {{entity.IsNew ? '': ' - ' + entity.Projnr}}"
},