It is the base class for most of the application views. It provides a number of methods that can be used to manage the state and behavior of a view, such as showing and hiding the view, setting and checking focus, and handling long press events. It also provides methods for working with selection nodes, which seem to be used to perform actions on groups of items. The class includes a number of methods that are called at different points in the lifecycle of a view, such as when the view is shown or hidden, or when it gains or loses focus.
This method is a constructor for the BaseView class. It initializes a new instance of the class and sets the name of the instance.
argument name | type | default value | description |
---|---|---|---|
name | string | n/a | The name of the instance. |
This method initializes a view with a given set of arguments.
argument name | type | default value | description |
---|---|---|---|
view | mc.types.node | invalid | The view to initialize. |
args | mc.types.array | invalid | The arguments to pas |
This method sets focus on a given target node.
argument name | type | default value | description |
---|---|---|---|
target | mc.types.node | n/a | The node to set focus on. |
forceSet | boolean | false | A flag indicating whether to force the focus to be set, even if the node is not focusable. |
This method sets focus on a given target node and locks focus on that node until it is unlocked.
argument name | type | default value | description |
---|---|---|---|
target | mc.types.node | invalid | The node to set focus on. |
message | string | n/a | A message to display when focus is locked. |
This method checks if a given control is currently focused.
argument name | type | default value | description |
---|---|---|---|
control | mc.types.node | invalid | The control to check focus on. |
This method applies a data map to a set of controls. A data map specifies the path to data for a field.
argument name | type | default value | description |
---|---|---|---|
dataSource | dynamic | invalid | The data source to apply the data map to. |
controls | mc.types.array | invalid | The controls to apply the data map to. |
This method toggles a timer for long press events. If the interval is greater than 0, the timer is started and set to repeat. If the interval is 0, the timer is stopped and reset. If a long press is in progress, it will be finished.
argument name | type | default value | description |
---|---|---|---|
interval | float | n/a | The interval at which the timer should fire, in seconds. |
This method is called when the long press timer fires. It will either start or update a long press event, depending on the current state of the event.
None. This method does not take any arguments.
This method creates a selection node with a given set of properties.
argument name | type | default value | description |
---|---|---|---|
initialItem | mc.types.node | n/a | The initial item in the selection. |
action | string | "display" | The action to perform on the selection. |
actionInfo | mc.types.assocarray | {} | Additional information about the action to perform. |
targetScreen | string | "" | The name of the target screen for the action. |
selectionCompName | string | "mc_Selection" | The name of the component to use for the selection node. |
This method executes a selection node. It assumes that there is an "appController" instance in the IOC that has an "onExecuteSelection" method.
argument name | type | default value | description |
---|---|---|---|
selection | mc.types.node | n/a | The selection node to execute. |
observeIfPendingAfterExecution | boolean | true | A flag indicating whether to observe the selection node if it requires async resolution. |
This method cancels a pending selection node.
argument name | type | default value | description |
---|---|---|---|
selection | mc.types.node | n/a | The selection node to cancel. |
This method destroys the current view.
None. This method does not take any arguments.
This method is called when the view is shown for the first time.
None. This method does not take any arguments.
This method is called when the view is shown.
None. This method does not take any arguments.
This method is called when the view is hidden.
None. This method does not take any arguments.
This method is called when the view gains focus.
argument name | type | default value | description |
---|---|---|---|
isSelfFocused | boolean | n/a | A flag indicating whether the focus was gained by the view itself or a child of the view. |
This method is called when the view loses focus.
None. This method does not take any arguments.
This method is called when the state of a selection node changes.
argument name | type | default value | description |
---|---|---|---|
state | string | n/a | The new state of the selection node. |
selection | mc.types.node | n/a | The selection node whose state has changed. |
This method is called when the completion state of a selection node changes.
argument name | type | default value | description |
---|---|---|---|
completionState | string | n/a | The new completion state of the selection node. |
selection | mc.types.node | n/a | The selection node whose completion state has changed. |
This method is called when the view is added to an aggregate view.
argument name | type | default value | description |
---|---|---|---|
view | mc.types.node | n/a | The aggregate view that the view was added to. |
This method is called when the view is removed from an aggregate view.
argument name | type | default value | description |
---|---|---|---|
view | mc.types.node | n/a | The aggregate view that the view was removed from. |