class staticbo.shared. ModelState
Source: shared/
Specifies the possible states of the editable model instances. This enumeration is used by the models internally to track the changes in the model instances. Its value is available through the getModelState() method.
Method
new ModelState()
Creates a new enumeration to define model states.
- Extends
- bo.system.Enumeration
Properties
read-only$name
string
The name of the enumeration. The default value is the name of the constructor.
- Inherited from
- bo.system.Enumeration#$name
read-onlychanged
number
The model instance is changed.
- Default value
read-onlycreated
number
The model instance is new.
- Default value
read-onlymarkedForRemoval
number
The model instance is marked to delete.
- Default value
read-onlypristine
number
The model instance is unchanged.
- Default value
read-onlyremoved
number
The model instance is deleted.
- Default value
Method
hasValue(name) → boolean
Determines if the enumeration has an item with the given name.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
name |
|
|
The name of the enumeration item. |
- Inherited from
- bo.system.Enumeration#hasValue
- Returns
-
True if the name is an enumeration item, otherwise false.