Abstract class for inheritance.
An application must use this class as the base of inheritance for its custom screens.
Table of contents
ARGUMENT | TYPE | DESCRIPTION |
---|---|---|
params |
Object
|
Specifies properties of the new view. |
define([
"dojo/_base/declare",
"aps/_View"
], function (declare, _View) {
return declare(_View, {
init: function () {
},
onShow: function () {
}
});
});
PROPERTY | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
description | string | “” | Screen description that (if not empty) overrides the description declared in APP-META. |
label | string | “” | Screen label that (if not empty) overrides the label declared in APP-META. |
visible | boolean | false | Visibility flag. Property is readonly. |
Screen description that (if not empty) overrides the description declared in APP-META.xml. Default value: “”.
Screen label that (if not empty) overrides the label declared in APP-META.xml. Default value: “”.
Visibility flag. Default value: false.
METHOD | RETURN | DESCRIPTION |
---|---|---|
buildStaticURL (staticFile) | string
|
Generates the URL for the spceified static file |
buttonState (type, params) | undefined
|
Changes state of a navigation button |
byId (id) | widget
|
Looks up for widget by the generated id, then by the given id |
genId (localId) | string
|
Generates a widget ID unique in scope of the application |
getChildren () | array
|
Returns all direct children of this widget |
init () | any
|
The init method is called on loading a view and usually is used to initialize the widget properties |
reset () | undefined
|
Resets value and state to what it was at initialization for all children of this view |
validate () | boolean
|
Called by oninit, onblur, and onkeypress |
Generates the URL for the spceified static file. Uses the package ID and file name to generate URL.
Return: string
ARGUMENT | TYPE | DESCRIPTION |
---|---|---|
staticFile |
String
|
Name of a static file inside of the package. |
Changes state of a navigation button. Finds a navigation button by type and setting properties from params.
Return: undefined
ARGUMENT | TYPE | DESCRIPTION |
---|---|---|
type |
String
|
Callback |
params |
Object
|
An object with the following properties: |
Looks up for widget by the generated id, then by the given id.
Return: widget
ARGUMENT | TYPE | DESCRIPTION |
---|---|---|
id |
Number
|
The identity to use to delete the object |
Generates a widget ID unique in scope of the application.
Return: string
ARGUMENT | TYPE | DESCRIPTION |
---|---|---|
localId |
String
|
Local ID of the widget, unique in scope of the view. |
Returns all direct children of this widget. Returns all widgets underneath this.containerNode whose parent is this widget. Note that it does not return all descendants, but rather just direct children. Analogous to Node.childNodes, except containing widgets rather than DOMNodes.
Return: array
The init method is called on loading a view and usually is used to initialize the widget properties. It is not called, when navigating to the view for the second and all subsequent times. The method initiates widgets and returns widget definition without loading the widgets. The control panel loads the widgets and only after that calls the onShow method. This method can return an array containing definition of widgets that the aps/load method can use. In this case, the lifecycle init => onShow => onContext methods will wait for resolving of the aps/load promise.
Return: any
Resets value and state to what it was at initialization for all children of this view.
Return: undefined
Called by oninit, onblur, and onkeypress. Show missing or invalid messages if appropriate, and highlight textbox field.
Return: boolean
EVENT | RETURN | DESCRIPTION |
---|---|---|
onCancel () | undefined
|
An event handler called from the control panel, when a user clicks on the “Cancel” navigation button |
onContext () | undefined
|
This handler is called once the _aps |
onHide () | undefined
|
This handler is called when a user leaves this view |
onPrev () | undefined
|
An event handler called from the control panel, when a user clicks on the “Previous” navigation button |
onShow () | any
|
This handler is called before making the view visible |
onSubmit () | undefined
|
An event handler called from the control panel, when a user clicks on the “Submit” navigation button |
An event handler called from the control panel, when a user clicks on the “Cancel” navigation button.
This handler is called once the _aps.context_ is received. The method can return a promise (dojo/deferred). In this case the lifecycle init => onShow => onContext methods will wait for the resolving of the promise.
This handler is called when a user leaves this view.
An event handler called from the control panel, when a user clicks on the “Previous” navigation button.
This handler is called before making the view visible. It can return a promise (dojo/deferred). In this case the lifecycle init => onShow => onContext methods will wait for the resolving of the promise.
An event handler called from the control panel, when a user clicks on the “Submit” navigation button.