Template options define the behavior of the entire model.
noDirty
- do not set the $isDirty
change flag upon data model changes.
bindOnce
- an array of strings defining which root properties of the model will be bound once.
persistSelect
- an array of strings that defines the arrays of the model for which to keep the
position of the selected item during saving or reloading of the model.
skipDirty
- an array of strings that defines the paths to the model properties,
when changing which you do not need to set the$isDirty
change flag.
The $isDirty
flag is responsible for displaying a message about the need to save the model after making
changes, as well as for the behavior of some controls. For example, the button associated with the Save
command will be automatically allowed after changing the model. If the noDirty
option is set, then the
$isDirty
flag will not be set.
The bindOnce
property allows you to define the root properties of the model that will only bind to data
upon the first model loading. Upon further reloading (for example, using the Reload
command or after saving
the model), this property will not be rebound. This is most often used to bind the catalog items.
bindOnce
array, you can specify only the root properties of the model (that
is, only those that do not have a period in their names).
The persistSelect
property allows you to define arrays in the model for which the position of the selected
item ($selected
). will be persisted. The position will be persisted when the model is saved (for example,
with the Save
) command) and when it is reloaded (for example, with the Reload
command).