val = oPanel.OpenViewModal(sObjectPath, sOptions, sParams, vArguments)
|sObjectPath||(String) Path (relative or absolute) to the object or component whose viewer will be opened. |
For detailed description see sObjectPath.
|sOptions||[optional] (String) The parameters transferred to the viewer. These define where and how to open the viewer. |
Entries are in KeyVal format, for example "target:_blank;modal:1;".
For detailed description see sOptions.
|sParams||[optional] (String) Parameters transferred to the object that is to be viewed by the corresponding viewer. |
Entries are in KeyVal format, for example "name1:value1;name2:value2;".
For detailed description see sParams.
|vArguments||[optional] (Variant) The value that is automatically passed into the Arguments property. The value of this property is typically read in the onPanelStartEnd event and it serves for passing the input data to the opened window directly from the script.|
After pressing the OK button, the value entered in this window is returned (see the note below).
Two properties are essential for modal opening of the PmaPanel object viewer:
This concept allows to create the windows (the forms) where the panel content is not directly connected (by bindings, script) with the application, but the whole initial state of the window is passed by the input parameter and the whole state after editing the content is passed by the return value.
For passing multiple values by a single parameter the VBScript.Array function can be used.
var arr = Pm.CreatePmArray().Array1("text 0", 5);
var r = pMe.PmPanel.OpenViewModal("/Panel3", "", "par:nmb=2;", arr);
var a = pMe.Arguments;
pMe.Items("/text0").Value = a.GetItem(0);
pMe.Items("/text1").Value = a.GetItem(1);
var r0 = pMe.Items("/text0").Value;
var r1 = pMe.Items("/text1").Value;
pMe.ReturnValue = Pm.CreatePmArray().Array1(r0, r1);