Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Opening the viewer of the PmaEventGroup object

The viewer of this object is opened by by the Pm.CreateView method, where in the sViewPath parameter the path to this object is entered.
 
The PmaEventGroup object implements a single viewer:
- /#history : (Default) Event (history) viewer.
 
The history viewer is represented by a preconfigured panel PmaPanel. This panel is registered in the PmaEventGroup object.

When the viewer of the PmaEventGroup object is being opened, the system redirects to corresponding registered panel. See Viewing alarms/events.

Viewer parameters:
pars[optional] (PmMap) The viewer is in fact a preconfigured panel PmaPanel, therefore all the viewer parameters are contained in the pars parameter The preconfigured panel PmaPanel of the history viewer uses the following parameters.
filter (optional) - Filtering string of KeyVal type.

If not defined then all items of the group will be displayed.

In order to easily create/set an embedded map (Submap) in another map's item it is possible to use the PmMap.mapSetSubmapAt method. This method creation of the submap in the item and can add multiple item from a string in the KeyVal syntax.

grouppath (optional) - Path to the PmaEventGroup object.

If the path is not defined then this parameter is added during opening while redirecting from the event group to the registered viewer panel.

Arguments[optional] (Variant) Value passed to the panel viewer that is being opened. It can be a simple value (Integer, String, ..), array or object of the PmArray or PmMap type (it is not recommended to transfer objects of other types here).
This value is then available:
- in the onOpen event
- in the PmaPanel object by means of the PmgRoot.Arguments property
onOpen[optional] (Function) The event function for managing the event of viewer opening.

For JavaScript the object function is entered.

For VBScript the object PmAction is entered.

The function has a single parameter ev containing information regarding the corresponding event.

ev.Arguments - (Variant) Input value of the viewer. See Arguments.
onClose[optional] (Function) The event function for managing the event of viewer closing.

For JavaScript the object function is entered.

For VBScript the object PmAction is entered.

The function has a single parameter ev containing information regarding the corresponding event.

ev.CloseReason - (String) Identifier of the window closing type. See the sReason parameter in the PmgRoot.Close method.
ev.ReturnValue - (Variant) Output value of the viewer. See PmgRoot.ReturnValue.
The viewer parameters are in the form of the PmMap object that is filled from value of the sView parameter (of the KeyVal type) in the Pm.CreateView method.

By filling from the KeyVal value all the parameters are initially stored as string. The content of the PmMap object can be then modified as needed - the items can be modified, added and deleted.

The PmMap object can also contain other embedded PmMap objects (Submap). The PmMap.mapSetSubmapAt method can be used in order to create a new PmMap or make one accessible.

Example1:
Opening the viewer of the event history (with default settting) in a named independent window
JavaScriptSelect and copy to clipboard

var oCreator = Pm.CreateView(pMe.PmPanel, "/Events/#history", "", "target:_blank.events");
oCreator.Open();
Example2:
Opening the viewer of the event history with passed filtering parameter in a named independent window
JavaScriptSelect and copy to clipboard

var oCreator = Pm.CreateView(pMe.PmPanel, "/Events/#history", "pars:{filter:{desc:#eq:Boil;}};", "target:_blank.events");
oCreator.Open();
Example3:
Opening the viewer of the event history with passed path to grouppath
JavaScriptSelect and copy to clipboard

var oCreator = Pm.CreateView(pMe.PmPanel, "../EventHistory", "pars:{grouppath:../Events;};", "target:_blank.events");
oCreator.Open();

History:
Pm9.00.09: Created
PROMOTIC 9.0.9 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