Update cookies preferences
Promotic

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 context menu of the object or by pressing the Insert key after selecting the object).
 
This preconfiguration is included in the "/ Panels (PmaPanel) / Common inputbox" group.
 
This preconfiguration can be created in the PmaFolder, PmaRoot, PmaPanel, PmaWorkspace or PmaPrototype object.

- The preconfiguration creates an object of the PmaPanel type.
- The preconfiguration is created including the panel (object of the PmaPanel type) is functional also as Web panel.


As example the following input boxes are included in the panel: PmgWCombo, PmgWCheck, PmgWEdit and PmgButton.
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 method.

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 objectName of the object created in the Pma object tree.
The maximum name length is 30 characters.
This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and first character must not be a number.
Default: "ModalDlg"
PermissionsOn this tab permissions of the object are defined. See the "Permission" tab of the PmaObject object.
Enable as Web componentSpecifies 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.
Example:
The entry values from the val0, val1, val2 array will be displayed in Pmg objects of the window.
- for the PmgWCombo object the index (val0) will be sent.
- for the PmgWCheck object value of the Boolean type (val1) will be sent.
- for the PmgWEdit object value of the String type (val2) 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 object.
JavaScriptVBScriptSelect and copy to clipboard

var oExtra = Pm.CreatePmMap();
var arr = Pm.Array1(2, -1, "Promotic");

oExtra.Arguments = arr;
oExtra.onClose = Pm.CreatePmAction(1, pMe, "ClosePanel");
pMe.PmPanel.OpenView("/ModalDlg", "target:_blank;modal:1;", "", oExtra);
Obtaining returned value in designer method ClosePanel with parameters oSystem and oPrivate of this object.
JavaScriptVBScriptSelect and copy to clipboard

var aVal = oSystem.ReturnValue;
if (Pm.IsValid(aVal))
{
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.
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.