The StateManager object dispatches a ChangeFailedEvent object when an attempt to set the state results in an error.
The event includes a reason and reasonCode property, which define the reason for which the attempt to
change data failed. The failedValues property of the ChangeFailedEvent object is an array of key-value pairs of state
data you tried to set.
For an example, see StateManager.
The ChangeFailedEvent object has the following properties:
failedValues (Array) an array of key-value pairs of state data you tried to set.
reason (String) the reason for which the attempt to change data failed
reasonCode (Number) A numeric code corresponding to the reason for which the attempt to
change data failed. The reasonCode and reason properties can be set to the following values:
|
|
|
Details |
|
|
|
When a key name begins with |
|
|
|
Keys must be 100 characters or less, and they cannot contain spaces. |
|
|
|
Each value must be 1000 characters or less. Values must be String objects. Setting a value to |
|
|
|
You are limited to setting up to 20 keys. |
|
|
|
You can only call |
|
|
|
target (Object) The StateManager object that dispatched the event.
type (String) The type of event. The type property is set to
"changeFailed".