Web Panels

The PmPanel object can offer its image to internet clients (Firefox, Chrome, Chrome on mobile, Edge, MS InternetExplorer etc.) in the form of dynamic HTML pages. These dynamic pages are created automatically in the development environment when compiling the panel and they are stored in the "Application.pra" file.

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

The client requiring data from this WEB component is type of "PmWebClient" from the license point of view.

Up to the version PROMOTIC Pm8.2 the HTML pages generated by the system were designed only for MS InternetExplorer (MSIE). Since the version Pm8.2.0 the HTML pages generated by the system were transformed to standard Ajax and HTML5 technologies so these can be displayed in alternative browsers (Firefox, Chrome, Opera ..) including their mobile versions. Several limitations are connected with this fact:
- The MSIE since version 8 is supported, but we highly recommend to use version 10 and higher (the HTML5 technology is supported as standard from this version). See Limitations for MS InternetExplorer 8.
- If the WEB panel is to be displayed in non-MSIE browsers (i.e. Firefox, Chrome ..), then in the corresponding PmPanel object the "Scripting language settings" configurator must be set to "javascript". The graphic item scripts are executed on the client side (see further) and the non-MSIE browsers do not support the use of VBScript.

In such case the ActiveX items TrendsView and PmTable are not executed directly in the HTML pages (non-MSIE browsers do not support the ActiveX technology), but are "emulated" by HTML code. Therefore it is not necessary to install these ActiveX items on the client side (see Web client installation). See ActiveX graphic items and WEB panels.

WEB panels basic principle:
- Graphic items are compiled into dynamic HTML form (using so called Alax technology).
- When the client is opening panel, the compiled dynamic HTML panel page is loaded from the server (i.e. from PROMOTIC application). Panel refreshing (see the configurator "Refresh period of HTML pages [s]") is called automaticaly 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 graphic items events are running on the client side (i.e. in the browser). Some restrictions are based on this fact and these are described below. The main restriction is that it is unable to access directly by script to other objects in the application tree, for example access for values of PmData object (this restriction is valid for scripts - not for example for PP - Binding to Promotic object property data binding - it can use references to other objets).

This limitation can be solved, by calling for example panel the method (i.e. in item event) pMe.PmPanel.Methods.XXX(a,b,..). This calling of XXX method makes the client send XML command to server and so the method is called on server side. In this panel method the script can be present, accessing other objects in the application tree. 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 - Binding to the text file content and VB - Binding to the script expression

- Limitations for writing of algorithm (scripts):
- It is not possible to use the reference to other PROMOTIC objects in application tree (e.g. to use pMe.Pm("/data/xy")). If writing to other object from WEB panel is needed it 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 PmPanel type object, only the following methods are functional: Methods, OpenView, ViewerType, Close.
- The scripts can be used for almost all graphic item events. So far for the WEB the following events are not functional: PmiWEdit.onDataEditing and PmiWEdit.onDataEditCancel.
- So far, the following methods and properties are not functional for WEB: Blink, Focus, FullName, MouseOn, Refresh, ScreenX, ScreenY.
- The global object Pm: many methods are functional on WEB but some are not. The description of each method of this object provides the information of WEB functionality.
- Limitations for graphic items::
- PmiRasterImage: Enable transparency color configurator is not taken into consideration.
- PmiText: Type of text shading configurator is not taken into consideration.
- PmiAx: It is functional for PROMOTIC ActiveX objects TrendsView and PmTable. For other ActiveX objects it is not functional. See ActiveX graphic items and WEB panels.
- PmiLine: Pattern configurator is not taken into consideration.
- PmiWCombo: The Sort configurator is not relevant. The Type configurator with "Selection and edit" setting is not functional for WEB so far.
- PmiWAnimate: -1 = Repeat back configurators is not taken into consideration. The methods Seek and Sound are not functional.
- PmiPanelMeter: This obsolete item is not functional on WEB.
- Limitations for calling the user methods of PmPanel objects:

See User methods in PmPanel object.

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

- 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

- Limitations for MS InternetExplorer 8:

It is recommended to use MS InternetExplorer 10 or higher. Unfortunatelly, for WindowsXP these higher versions are not available (the last version is 8). The lower versions do not support some standards causing some functional limitations:

- It is not possible to read and write into item properties (i.e. It is necessary to use the methods PmiItem.GetProp or PmiItem.SetProp instead.

Notes and directions:

Another algorithm for local panel and WEB panel:

A panel (created in the PmPanel 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 on button up), which has to do something different in local panel than in Web panel, than it is recommended to use the PmiRoot.ClientType property. The value of this attribute informs, whether the panel is opened in the application or in the WEB browser. Examples: see the ClientType property description.

Panel reentrancy:

When developing a WEB panel, it is necessary to keep in mind, that, multiple clients can see it simultaneously. So it is a bad idea for example to create one panel (one PmPanel object) able to display multiple devices according to a variable set by 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, than the best way to do so, is:

- to use parameters of PmiRoot graphic item (see: Parameters of graphic item) and/or

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