object can offer its image to internet clients (Chrome
..) 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
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
technologies so these can be displayed in alternative browsers (Chrome
..) 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
..), then in the corresponding PmPanel
object the "Scripting language settings
. 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 this 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).
- 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 configurator "Refresh period of HTML pages [s]
") 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 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 objects).
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 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, then is possible to do so:
- 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:
configurator is not relevant. The Type
configurator with "Selection and edit"
setting is not functional for Web so far.
- Limitations for calling the designer's method of PmPanel objects
See Designer's methods in PmPanel 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
- Limitations for MS InternetExplorer 8
It is recommended to use MS InternetExplorer 10 or higher. Unfortunatelly, for OS Windows XP these higher versions are not available (the last version is 8). The lower version do not support some standards causing some functional limitations:
- It is not possible to read and write into item properties (i.e. PmiItem.property=value
). It is necessary to use the methods PmiItem.GetProp
Notes and directions:Another algorithm for local panel and for 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, then 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.
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 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: