Web panels

The PmaPanel object can offer its image in the Web browser (Chrome, Firefox, Edge, InternetExplorer ...) in the form of dynamic HTML pages. These dynamic pages are created automatically in the development environment and they are stored in the "Application.pra" file.

So as the PmaPanel object would offer its image into the Web server, it is necessary to check the "Enable as Web component" configurator on the "Web server" tab and to fill in all other configurators on this tab correctly.

The client requiring data from this Web component is of the PmWebClient type from the licence point of view.

Since version Pm9.0.0 all WEB panels in PROMOTIC are designed only for Web browsers supporting standard HTML5 technology. It means for Chrome, Firefox, Edge, Opera, Safari etc. The InternetExplorer is supported only since version 11.

Since the version Pm8.2.0 the HTML pages generated by the system were transformed to standard HTML5 technologies so these can be displayed in alternative browsers (Chrome, Firefox, Edge, InternetExplorer ...) including their mobile versions.

Up to the version PROMOTIC Pm8.2 the HTML pages generated by the system were designed only for InternetExplorer.

Web panels basic principle:
- Pmg objects are compiled into dynamic HTML form (using so-called Alax technology).
- If the client is opening panel, then the compiled dynamic HTML panel page is loaded from the server (i.e. from PROMOTIC application). Panel refreshing (see the "Refresh period of HTML pages [s]" configurator) is called automatically and is based on periodically loading XML panel data, which are much smaller then the whole HTML page. For example if the panel is connected by data binding to 10 variables, then only 10 current values are periodically transferred. The server load is therefore minimal.
- The scripts in Pmg object events are running on the client side (i.e. in the Web browser). Some restrictions are based on this fact and these are described below.

The main restriction is that it is unable to access directly in the script to other objects in the tree of Pma objects, for example access for values in the PmaData object (this restriction is valid for scripts - not for example in the "PP - Data binding to Pma object property" data binding - it can use references to other objects).

This limitation can be solved, by calling for example panel the method (i.e. in Pmg object event) pMe.PmPanel.Methods.XXX(a,b,..). This calling the "XXX" method makes the client send XML command to server and so the method is called on the server. In this panel method the script can be present, accessing other objects in the tree of Pma objects. For additional info see more.



Here is a list of limitations that are put on panels that have to be offered to the Web server in the form of a HTML page.
- Limitations for data bindings:

It is NOT POSIBLE to use the data bindings S - Data binding to the text file content and VB - Data binding to the script expression

- Limitations for writing of algorithm (scripts):
- It is not possible to use the reference to other Pma objects in the tree of Pma objects (e.g. to use pMe.Pm("/data/xy")). If writing to other object in the Web panel is needed it, then is possible to do so:
- by calling pMe.PmPanel.Methods.XXX(a,b,..) method.
- by calling global methods of the application by using Pm.Methods.XXX(a,b,..).
- The pMe.PmPanel object can be used for affecting the whole panel. In the obtained PmaPanel object, only the following methods are functional: Methods, OpenView, ViewerType, Close.
- The scripts can be used for almost all Pmg object events. So far for the Web the following events are not functional: PmgWEdit.onDataEditing and PmgWEdit.onDataEditCancel.
- So far, the following properties and methods are not functional for the Web: Blink, Focus, MouseOn, Refresh, ScreenX, ScreenY.
- The global Pm object: many methods are functional on the Web but some are not. The description of each method of this object provides the information of Web functionality.
- Limitations for Pmg objects::
- PmgRasterImage: The "Enable transparency color" configurator is not taken into consideration.
- PmgWCombo: The "Sort" configurator is not relevant.

The "Type" configurator with "Selection and edit" setting is not functional for the Web so far.

- PmgVideo: The "-1 = Repeat back" value in the "Direction of playing" configurator is not taken into consideration.

The methods Seek and Sound are not functional.

- PmgActiveX: This object is not functional on the Web because all modern Web browsers no longer support ActiveX technology due to security reasons.
- PmgMeterBox: This object is obsolete and is not functional on the Web.
- Limitations for calling the designer's method of the PmaPanel object:

See Designer's methods in the PmaPanel object.

Called methods can have parameters and an output value (pResult) only:

- simple data types (e.g. Integer, String, etc.)
- 1-dimensional array defined e.g. Dim arr(20)
- 2-dimensional array defined e.g. Dim arr(10,20)
- there must not be other arrays in the array items

Notes and directions:

Another algorithm for local panel and for Web panel:

A panel (created in the PmaPanel object) can be opened directly in the runtime application (local panel) or in the Web browser (Web panel). If in such panel calling an algorithm is needed (for example after pressing the button), which has to do something different in local panel than in the Web panel, then it is recommended to use the PmgRoot.ClientType property. The value of this property informs, whether the panel is opened in the application or in the Web browser. Examples see description of the ClientType property.

Panel reentrancy:

When developing a Web panel, it is necessary to understand, that, multiple clients can see it simultaneously. So it is a bad idea for example to create one panel (one PmaPanel object) able to display multiple devices according to a variable set in the application. In such case the clients would be rewriting this global variable mutually and see incorrect values as a consequence. If one panel displaying various data is needed, then the best way to do so, is:

- to use parameters of the PmgRoot object (see: Parameters of the Pmg object) and/or


Pm9.00.00: Since version Pm9.0.0 all WEB panels in PROMOTIC are designed only for Web browsers supporting standard HTML5 technology. It means for Chrome, Firefox, Edge, Opera, Safari etc. The InternetExplorer is supported only since version 11.
Pm8.03.19: Various modifications and bugfixes of WEB panels, alarms, trends, forms (PmForm object) etc.
Pm8.03.13: Simplified user login on the Web. If incorrect name or password is entered then an error window is displayed. This window contains a button that cen be used to initiate new login attempt.
- Fixed bug: The PmgWCombo object was rendered with incorrect height.
- Improved user login window (opened by the Pm.WndLogon method).
Pm8.03.11: the Pm.WndLogon method is now functional also in Chrome browser.
New "PmaPanel > Web server > Refresh error indication method" configurator: Allows to supress displaying of error message in the panel informing about communication failure with server.
The local menu (onMenuFill and onMenuSelect) was redesigned in order to work correctly in all Web browsers.
Pm8.03.05: Fixed bug:
- The position and dimensions of panel open in an new window were not evaluated correctly (i.e. if "_blank").
- JavaScript panels were sometimes rendered incorrectly in InternetExplorer 9.
Pm8.03.04: Fixed bug: Bugfixes in applications that conflicted with the old InternetExplorer 8 browser.
- Methods Pm.CreateDate and Pm.FormatDate are now functional.
- Editing is now available in Touchpad browsers that do not support mouse - for example Android. These browsers do not support mouse doubleclick that is used for editing in PmgString and PmgWTable objects. Now it is possible to edit the Pmg object content by opening the Pmg object local menu - i.e. for example in Android system, by long touch on the item.
- Edit mode in the PmgWEdit object fixed - did not work in Chrome and Android.
- Panel opening sometimes failed if characters with diacritics were used in panel parameters.
- The PmgTrendViewer object in JavaScript panels: Optimization of requests for large quantities or high frequency of queries.
- Pmg object rendering improved for old Web browser InternetExplorer 8.
- The patch has also been included into the version Pm8.2.18.
Pm8.02.17: In PmgString and PmgWEdit objects the focus behavior has been improved after the application is closed.
- If the unsupported data binding VB - Data binding to the script expression or S - Data binding to the text file content were used in the panel, then the Web panel did not open at all. Now it opens, but the bindings are not functional.
- The onMousePress event: (in Firefox or Chrome) worked even if the control was disabled.
- Update of automatically generated HTML panels for InternetExporer 11 (in this version, Microsoft again removed support for some previously used technologies).
- PmgRasterImage object: If the "Size" configurator was set to "Over parent", then the PNG format image did not display correctly on the Web.
- PmgTrendViewer object: emulated in HTML (i.e. in JavaScript panels):
- The time is now displayed on mouse cursor.
- Bugfix in the AddTrend method.
- Pm.WndLogon method: is now functional for alternative Web browsers (other than InternetExplorer).
- PmgTrendViewer object: emulated in HTML (i.e. in JavaScript panels):
- The TimeMin and TimeMax properties are now functional
- Table view of trends is now functional
Pm8.02.10: For InternetExplorer 8 (and lower): PmgTrendViewer and PmgWTable objects in JavaScript are not emulated in graphic panels (because this old browser does not observe some important standards) but the browser switches to full ActiveX view (these ActiveX items must be installed on client) - similar situation as for VBScript panels.
- Improved emulation of PmgTrendViewer and PmgWTable object for JavaScript panels.
- Corrected technological and device limits in PmgBarBox and PmgSliderBox objects.
- The Pm.GetBit and Pm.SetBit methods are now functional also for the Web.
- Improved emulation of the PmgTrendViewer object for JavaScript panels.
- The new PmgFrame.OpenView method.
- The "Pattern" configurator is now functional for object PmgRectangle and PmgEllipse.
- The "X corner rounding" configurator is now functional for the PmgRectangle object.
- The Pm.StringScan method is now functional.
- Emulation of the PmgTrendViewer object has been improved for JavaScript panels.
- Fixed bug: Variables of the Pmg object were not accessible in the InternetExplorer8 and lower (bug since Pm8.2.3 version).
- Optimalization of trends vieweing by the PmgTrendViewer object on the Web with slow HTTP connection.
Pm8.02.03: Improved emulation of objects PmgTrendViewer and PmgWTable for JavaScript panels.
Pm8.02.01: Improved emulation of ActiveX objects PmgTrendViewer and PmgWTable for JavaScript panels.
Pm8.02.00: The automatically generated Web pages are now improved in order to work properly in additional Web browsers Firefox, Chrome, Opera .... For full functionality, the panel must be modified:
- the Pmg object events must be written in JavaScript language. This language has been introduced to the PROMOTIC system and is currently used only for Web panels.

The JavaScript language is more advanced and general, and for the purposes of the PROMOTIC system even simpler than the VBScript language. See Comparison of the VBScript and JavaScript languages.

- PmgTrendViewer and PmgWTable objects are now HTML emulated (i.e. the ActiveX code no longer runs in the Web browser and all works as standard HTML). These objects are not yet fully function in this version - only the basic functions are working now.

Ther ActiveX objects are not functional.

- The automated generation of HTML code during panel compilation is now faster and the created HTML pages are smaller.
Pm8.01.12: Important modifications for InternetExplorer 10 Web browser. Unfortunatelly since this version of the viewer some major technologies are no longer supported. These technologies were used by Web panels up to the version of PROMOTIC 8.2. (The PROMOTIC 8.2 version now uses standard HTML technologies allowing to display the Web panels in Chrome, Firefox, Edge, InternetExplorer ...)
Pm8.01.08: There is a new safer method of computing the data bindings.
Pm8.01.01: Methods Pm.ColorOper and Pm.ColorRgb are now working also for Web panels.
Pm8.01.00: C++ formatting (see Value format type) is now implemented directly into the panel and therefore the PmAxTool1 activeX item is no longer needed.
- Sometimes, the real decimal values were evaluated incorrectly, if the system running the application was configured to use comma instead of periaod as decimal separator.
- Sometimes an errior occured when evaluating the "LN - Data binding as linear function calculation" data binding
Pm8.00.07: Fixed bug:
- Some configurators set by Macro expression $.par did not work properly.
- PmgWEdit: Did not work if the "Write data on losing focus" configurator was checked.
Pm8.00.06: Fixed bug:
- Additional Pmg object methods/properties/events added together with the information whether these item are functional in Web panels.
- The OpenView and OpenViewModal methods: added support for opening windows of specified size on specified coordinates (i.e. in the sOptions parameter the pos:xx; and size:xx;) settings are taken into consideration.
- the following methods have been enabled for Web: Pm.Logoff, Pm.WndLogoff and Pm.WndLogon.
- The way of displaying of the PmgVideo object in a HTML page has been modified. The old way was not working under InternetExplorer8.
PROMOTIC 9.0.15 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