Preconfiguration "Common modal window"
Common modal window for easy addition of inputboxes.
This preconfiguration can be activated when creating a new object (e.g. by "New object ..."
in the local object menu or after pressing the Insert
key after selecting the object) and is included in the group: "/ Panels (PmaPanel) / Common inputbox"
This preconfiguration can be created in the object: PmaFolder
- The preconfiguration creates an object of the PmaPanel
- The preconfiguration is created including the panel (object of the PmaPanel
type) is functional also a Web panel
As example the following input boxes are included in the panel: PmgWCombo
In the OK
button (in the PmgButton
object) in the onStart
event the entry argument values are loaded into each Pmg
object. In the onButtonUp
event the values from each Pmg
object are merged into the array and returned back to the object, that called the OpenView
The preconfiguration of common modal window, that can be easily extended by additional input boxes.
These configurators can be set before the preconfiguration is created:
|The name of created object||Name of the object created in the tree of Pma objects. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics, empty string, spaces and the first character must not be a number.
|Permissions||On this tab permissions of the object are defined. See the "Permission" tab of the PmaObject object.|
|Enable as Web component||Specifies whether this object has to be registered as a Web server component
After the preconfiguration is created, the "PmaPanel > Web server > Enable as Web component" configurator will be set to this value.
The entry values from the val0, val1, val2
array will be displayed in Pmg
objects of the window.
- for the PmgWCheck
object value of the Boolean
) will be sent.
- for the PmgWEdit
object value of the String
) will be sent.
- the array of edited values will be returned into the aResult variable.
Open the preconfigured window in the panel in the onButtonUp
event of the PmgButton
var oExtra = Pm.CreatePmMap();
var arr = Pm.CreatePmArray().Array1(2, -1, "Promotic");
oExtra.Arguments = arr;
oExtra.onClose = Pm.CreatePmAction(1, pMe, "ClosePanel");
pMe.PmPanel.OpenView("/ModalDlg", "_blank1", "", oExtra);
Obtaining returned value in designer's method ClosePanel with parameters oSystem and oPrivate of this object.
var aVal = oSystem.ReturnValue;
var val0 = aVal.GetItem(0);
var val1 = aVal.GetItem(1);
var val2 = aVal.GetItem(2);
Pm.Debug("val0=" + val0 + ", val1=" + val1 + ", val2=" + val2);
This preconfiguration is used in PreCfg - Preconfiguration examples