Abstract class for creating popups.
Application must use this class as the base of inheritance for popups.
Table of contents
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
Object
|
Specifies properties of the new view. |
define([
"dojo/_base/declare",
"aps/PopupView"
], function (declare, PopupView) {
return declare(PopupView, {
init: function () {
},
onShow: function () {
}
});
});
PROPERTY |
TYPE |
DEFAULT |
DESCRIPTION |
---|---|---|---|
string |
“” |
Screen description that (if not empty) overrides the description declared in APP-META. |
|
string |
“” |
Screen label that (if not empty) overrides the label declared in APP-META. |
|
string |
lg |
Size of the popup. |
|
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: “”.
Size of the popup. Can be: “sm”, “md”, “lg”. Default value is: “lg”.
Visibility flag. Default value: false.
METHOD |
RETURN |
DESCRIPTION |
---|---|---|
string
|
Generates the URL for the spceified static file |
|
undefined
|
Changes state of a navigation button |
|
widget
|
Looks up for widget by the generated id, then by the given id |
|
undefined
|
Closing popup without submitting data, resetting error state of inputs |
|
string
|
Generates a widget ID unique in scope of the application |
|
array
|
Returns all direct children of this widget |
|
any
|
The init method is called on loading a view and usually is used to initialize the widget properties |
|
undefined
|
Resets value and state to what it was at initialization for all children of this view |
|
undefined
|
Submitting popup data, closing popup |
|
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 |
---|---|---|
|
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 |
---|---|---|
|
String
|
Callback |
|
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 |
---|---|---|
|
Number
|
The identity to use to delete the object |
Closing popup without submitting data, resetting error state of inputs
Return: undefined
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
Object
|
Specifies the data that have to be passed to the popup opener. |
Generates a widget ID unique in scope of the application.
Return: string
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
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
Submitting popup data, closing popup
Return: undefined
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
Object
|
Specifies the data that have to be passed to the popup opener. |
Called by oninit, onblur, and onkeypress. Show missing or invalid messages if appropriate, and highlight textbox field.
Return: boolean
EVENT |
RETURN |
DESCRIPTION |
---|---|---|
undefined
|
An event handler called from the control panel, when a user clicks on the “Cancel” navigation button |
|
undefined
|
This handler is called once the _aps |
|
undefined
|
This handler is called when a user leaves this view |
|
undefined
|
An event handler called from the control panel, when a user clicks on the “Previous” navigation button |
|
any
|
This handler is called before making the view visible |
|
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.