Promotic
WikipediaLinkedInYoutubeTwitterFacebook

onPanelStopEnd - event of the PmgRoot object

Description:
The event is triggered at the end of the panel closing sequence, after the onStop event is triggered for all Pmg objects. This is the last triggered event related to panel closing.
Parameters:
pMe(Object) Reference to the PmgRoot object where the event rises.
pEvent(Object) Reference to object describing detailed information about the specific event.
pEvent.Reason - (String) Information regarding panel closing.

This value is transmitted from calling the PmgRoot.Close(sReason) method. If the panel is not closed by the PmgRoot.Close method, then the value is an empty string.

This can be used, for example, if the panel is open as modal window (see How to work with modal windows). If the modal panel is closed by the OK button, the PmgRoot.Close method sets the sReason parameter to, for example, "ok". In the PmgRoot.onPanelStopEnd event it is possible to test this value and the correctly fill in the value PmgRoot.ReturnValue.

Note:
In this event it is possible to make final setup of values from Pmg objects into the ReturnValue property.
 
This event is also functional in Web panels. But due to the limitations of some web browsers (Chrome) it is not possible to call, for example, the panel method in this event. The server can be informed about the panel status by the GetLastRefresh method.
See also:
Example:
An example of event content that generates a return value of the panel. The return values is represented by array containing two values from Pmg objects "/text0" and "/text1".
JavaScriptVBScriptSelect and copy to clipboard

if (pEvent.Reason == "ok")
{
var text0 = pMe.Items("/text0").Value;
var text1 = pMe.Items("/text1").Value;
pMe.ReturnValue = Pm.CreatePmArray().Array1(text0, text1);
}

History:
Pm8.03.00: Created
PROMOTIC 9.0.13 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice