Lifecycle
note
When loading from XML the value of a field is set later than you might expect which can cause problems if your field constructor needs information from the workspace.
note
A field object is created before being attached to a block. This can cause problems if your field constructor needs information from the workspace.
Field creation happens in the order below.
-
The field's constructor is called.
- The constructor sets the value to the provided or default value.
- The constructor sets the local validator but does not call it.
-
Field is appended to the block.
setSourceBlockis called- If the field is on a rendered workspace, init is called.
- The
fieldGroup_is created and appended. initViewis called.bindEvents_is called.
- The
-
Field XML value is set.
