Space TimelineSpace Timeline

Model

In Docupace Start UI for the widget, the model is created to store the state of all fields and field groups on the page.

  • You can access the widget model using `$scope.widgetAppModel`

  • The model is available in the field execution context as `model`.

  • For input fields, wherein user enters data (Text input, Single select, Field group, etc.) `model` refers to the model of this field.

  • For other field types, that do not receive data from the user (Rich-text, Separator, Action (button), Image, etc.) `model` refers to the model of the containing Field group.

Name Type

Return type

Description

Name Type

Return type

Description

`value`

any

field value

`isEnabled()`

boolean

value of the Enabled condition

`isReadOnly()`

boolean

value of the Read-only condition

`isVisible()`

boolean

value of the Visibility condition

(if `isEnabled()` returns `false`, `isVisible` is also `false`)

`receiveViewValue(value)`

void

`value` - a value received from the user input

`validityState`

ValueRulesFulfillmentStatus<TValue>

state of all validations (rules) attached to the field

`parent`

ValueModel

reference to a parent model. For the root model `parent` is `null`.