.
contact contact


WEBDLG Enhancements

 
.
  Eloquence B.08.20 includes a substantially enhanced WebDLG.

Summary of Enhancements and new functionality:

  • Dialogs are dynamically updated (not reloaded) using Ajax browser functionality.

  • The Dialog tab order is enforced, RETURN and ENTER keys are enabled for tab navigation.

  • Enhanced the support for CSS style definitions.

  • Added support for HTTP Basic Authentication against the eloqsd server (Apache version 2.2 only).

  • Added support for token and environment variable resolving in the mod_eloq command and environment configuration.

  • Added the PopText object class.

  • Added the borderstyle attribute (Dialog, GroupBox, Image).

  • Added the ListBox ruleoverride and singleclick attributes.

  • Added the System authlogin and authpassword attributes.

  • Allow the browser to keep JavaScript functions in memory.



Dynamically updated dialogs

WEBDLG Dialogs are now dynamically updated, whenever possible, using Ajax ("Web 2.0") browser functionality.

As long as a DLG DO invocation refers to the same Dialog that is currently displayed, and this Dialog is not structurally modified, the HTML page is not reloaded but dynamically updated.

This may significantly improve performance if a Dialog frequently returns to the program.

This feature is enabled automatically depending on the browser capabilities.

In may cases a WEBDLG dialog may be updated incrementally (rather than reloaded) as long as its structure is not changed. For example, adding or hiding an object changes the dialog structure and requires a re-layout and reloads the dialog. However, updating a field may update the dialog.

The attributes below are considered to not modify the Dialog structure.

Common attributes:
focus, udata

StaticText attributes:
text

EditText attributes:
content, cx, cy, topitem, clear, add, line, home, end, bol, eol, up, down, left, right, npage, ppage, ins, delch, delln, deleol, deleot, file, insertfile, writefile

PushButton attribute:
text

CheckBox and RadioButton attributes:
text, active

ListBox and PopText attributes:
content, cx, cy, topitem, activeline, clear, add, line, home, end, bol, eol, up, down, left, right, npage, ppage, ins, delln, deleot, file, writefile

Image attributes:
url
If a program invokes DLG SET to modify any other attributes than listed above, or invokes DLG NEW or DLG DEL, WEBDLG assumes that the current Dialog is structurally modified and therefore causes the HTML page to be reloaded.

The new [HTML] EnableAjax eloqwebd configuration parameter may be used to globally disable this feature if desired:

[HTML] EnableAjax

  • Nonzero (default): The Ajax functionality is enabled if supported by the browser.

  • Zero: The Ajax functionality is disabled, i.e., the HTML page is reloaded whenever a Dialog returns to the program, as in previous WEBDLG versions.

The configured value may be queried or overridden at runtime using the Application.enableajax attribute (see below).


Navigating WEBDLG dialogs

WEBDLG now enforces the Dialog tab order. In addition, the RETURN and ENTER keys are now by default enabled for tab navigation, and the RETURN/ENTER and SPACE keys may be used to trigger button and ListBox objects.

The new [HTML] FocusTabMode eloqwebd configuration parameter allows to configure this new functionality:

[HTML] FocusTabMode

  • 2 (default): The Dialog tab order is enforced, the TAB and RETURN and ENTER keys are enabled for tab navigation. In addition, the RETURN/ENTER and SPACE keys may be used to trigger button and ListBox objects (depending on the browser implementation).

  • 1: The Dialog tab order is enforced, only the TAB key is enabled for tab navigation.

  • 0: The browser handles the tab navigation, as in previous WEBDLG versions. The tabindex HTML attribute is used to propose the desired tab order to the browser.
The new common tabstop attribute may be used to exclude an object from the Dialog tab order:

tabstop : integer, get/set

  • Nonzero (default): The object is part of the Dialog tab order.
  • Zero: The object is not part of the Dialog tab order.
The new common tabonenter attribute may be used to specify for an object whether or not the RETURN and ENTER keys are enabled for tab navigation:

tabonenter : integer, get/set

  • Nonzero: The TAB and RETURN and ENTER keys are enabled for tab navigation.
  • Zero: Only the TAB key is enabled for tab navigation.
The default value is nonzero for EditText and ListBox objects and zero for all other objects.

Notes:

  • If set to nonzero for a Button object, the RETURN and ENTER keys can no longer be used to trigger the button.

  • For multi-line EditText objects, the RETURN and ENTER keys always add a newline character, i.e., they are never enabled for tab navigation, regardless of the tabonenter attribute.

Enhanced the support for CSS style definitions

The Dialog style may now be specified using the eq_dialog CSS class, for example:
.eq_dialog {
  background-color: #c0a0a0;
  ...
}

The GroupBox style may now be specified using the eq_groupbox CSS class, for example:

.eq_groupbox {
  background-color: #00c0c0;
  ...
}

For EditText objects, the eq_edittext, eq_edittext_ml and eq_edittext_ro CSS classes are now combined, depending on the EditText attributes:

eq_edittext
defines the CSS style for every EditText object

eq_edittext_ml
is applied in addition to the eq_edittext class if the multiline attribute is set to nonzero

eq_edittext_ro
is applied in addition to the eq_edittext class if the editable attribute is set to zero

For example:

.eq_edittext {
  font-family: Courier;
  ...
}
.eq_edittext_ml {
  color: #000077;
  ...
}
.eq_edittext_ro {
  background-color: #ffffe0;
  ...
}
In the example above, a multi-line non-editable EditText object would be displayed using a Courier font, a #ffffe0 background color and a #000077 foreground color.

The new common cssid and cssclass attributes allow to override the default CSS class for an object.

cssid : string, get/set

Specifies a CSS identifier for an object. In contrast to a CSS class, a CSS identifier should be unique, i.e., should be used by only one object in a Dialog.

For example, if cssid = "Title" would be set for an object, the CSS definition below would be applied:

#Title {
  background-color: #c000c0;
  ...
}
cssclass : string, get/set

Specifies a CSS class for an object. A CSS class may be used for multiple objects in a Dialog.

For example, if cssclass = "My_GroupBox" would be set for the GroupBox objects in a Dialog, the CSS definition below would be applied:

      .My_GroupBox {
        border-style: ridge;
        border-width: 1px;
        border-color: #880000;
        ...
      }
Please note:
  • If the cssid and/or cssclass attributes are set, the default CSS class for the specific object is no longer applied.

  • In addition, if the specific object is a Dialog, GroupBox or Image and the object does not explicitly set any of the border attributes, the border properties are honored as specified in the CSS definition.

Support login when starting application

If configured, the browser opens a Login Dialog to query the user name and password, which are then authenticated against the Eloquence eloqsd server.

In a second step, the same user name and password are then used to start the configured program.

Configuration example (Apache httpd.conf configuration file):

<IfModule mod_eloq.c>

  <Location /eloq/prog1>
    SetHandler eq-web-dlg
    EloqCommand "PROG1,WWW"
    ...
    Require valid-user
    AuthType Basic
    AuthBasicProvider eloqsd
    AuthName "PROG1"
    EloqSDHostname "192.168.33.44"
  </Location>

  <Location /eloq/prog2>
    SetHandler eq-web-dlg
    EloqCommand "PROG2,WWW"
    ...
    Require valid-user
    AuthType Basic
    AuthBasicProvider eloqsd
    AuthName "PROG2"
    EloqSDHostname "192.168.33.44"
  </Location>

  ...
</IfModule>
In the example above, the browser opens a Login Dialog when the PROG1 program is started, and again when the PROG2 program is started. This is because two different "realms" are configured using the AuthName parameters: "PROG1" and "PROG2". The browser stores separate user name and password information for each realm.

Once a login was successful, the browser caches the user name and password information for the realm and no longer opens a Login Dialog (depending on the browser implementation, possibly subject to the browser configuration).

Notes:

  • The mod_eloq EloqSDHostname configuration parameter must be specified if the eloqsd server is located on a remote system, as shown in the example above. It may however be omitted if the eloqsd server is located on the local system.

  • The mod_eloq EloqSDUser and EloqSDPassword and the eloqwebd [EloqSD] User and Password configuration parameters must not be configured. Otherwise the user name and password specified in the Login Dialog are not used to start the program.

  • The user name and password specified in the Login Dialog may be referenced in the mod_eloq EloqCommand and EloqEnvironment configuration parameters using the $authlogin and $authpassword tokens (see below).

  • A program may query the user name and password specified in the Login Dialog using the System.authlogin and System.authpassword attributes (see below).

  • The browser sends the user name and password information in clear text, therefore this should only be used in a trusted environment, unless the Apache web server is configured to use the secure HTTPS protocol.

  • This functionality depends on the Apache 2.2 authentication provider support and therefore does not work with Apache versions before 2.2.

token

Added support for token and environment variable references in the mod_eloq EloqCommand and EloqEnvironment configuration parameters.

The EloqCommand and EloqEnvironment values may use the tokens listed below which are resolved when the program is started:

$remoteaddr

This token is replaced with the IP address of the system where the browser runs.

$remotename

This token is replaced with the host name of the system where the browser runs (equivalent to $remoteaddr if the host name is unknown, e.g. if the Apache web server is not configured to perform DNS reverse lookups).

$remoteport

This token is replaced with the port number the browser uses for this request.

$authlogin

This token is replaced with the user name if HTTP Basic Authentication is used.

$authpassword

This token is replaced with the password if HTTP Basic Authentication is used.

$(VARIABLENAME)

This token is replaced with the value of the VARIABLENAME environment variable.


PopText object class

Added the PopText object class. The PopText class implements a selectable list which displays one single line. It provides the same attributes as the ListBox class.

selonfocus attribute

The common selonfocus attribute allows to override the eloqwebd [HTML] SelectOnFocus configuration.
selonfocus : integer, get/set

Specifies whether the content of EditText fields are selected on focus. Valid attribute values are:

  • 0 - don't select anything
  • 1 - select single-line EditText
  • 2 - select multi-line EditText
  • 3 - select both single- and multi-line EditText

The selonfocus attribute allows to override the global eloqwebd [HTML] SelectOnFocus configuration with an object-specific value. If specified for a Dialog or GroupBox object, all contained EditText objects are affected.

The default value is defined by the Application.selonfocus attribute (see below) or the eloqwebd [HTML] SelectOnFocus configuration parameter.

If neither is set, the default value is 1.


Dialog xraster and yraster attributes

The Dialog xraster and yraster attributes allow to override the eloqwebd [HTML] XRaster and YRaster configuration with Dialog-specific values.
xraster : integer, get/set
yraster : integer, get/set

Specifies the width and height of a character cell, used for internal coordinate calculations.

The xraster/yraster unit is a 10th of a pixel to allow for sub-pixel raster sizes. For example, to specify a 10.5 pixel raster size, a value of 105 must be used.

The default values are defined by the Application.xraster and yraster attributes (see below) or the eloqwebd [HTML] XRaster and YRaster configuration parameters.

If neither is set, the xraster default value is 90 (9 pixels) and the yraster default value is 180 (18 pixels).


borderstyle attribute

Added the borderstyle attribute for Dialog, GroupBox and Image objects.

borderstyle : string, get/set

Specifies the border style. Valid attribute values are:

  • "none" - no border
  • "solid" - solid border
  • "dotted" - dotted border
  • "dashed" - dashed border
  • "double" - double borders
  • "groove" - 3D grooved border
  • "ridge" - 3D ridged border
  • "inset" - 3D inset border
  • "outset" - 3D outset border
By default, a solid border is displayed if the border thickness (defined by the border attribute) is 1, or a 3D grooved border is displayed if the border thickness is greater than 1.

Please Note: If an object-specific CSS id or class is defined and the object does not explicitly set any of the border attributes, the border properties are honored as specified in the CSS definition. For details, please refer to the cssid and cssclass documentation above.


csswidth and cssheight attributes

Added the csswidth and cssheight attributes for StaticText, EditText and ListBox objects.

csswidth : integer, get/set

If nonzero, the object pixel width is specified using the CSS width style attribute. The browser typically uses this to enforce the object width.

If set to -1, the pixel width is calculated by multiplying the object raster width (w attribute) by the character cell width (xraster).

If set to a positive value, the CSS width is set to the specified value.

The default value is 0 for StaticText objects and -1 for EditText and ListBox objects.

cssheight : integer, get/set

If nonzero, the object pixel height is specified using the CSS height style attribute. The browser typically uses this to enforce the object height.

If set to -1, the pixel height is calculated by multiplying the object raster height (h attribute) by the character cell height (yraster).

If set to a positive value, the CSS height is set to the specified value.

The default value is 0.


ListBox ruleoverride and singleclick attributes

Added the ListBox ruleoverride and singleclick attributes.
ruleoverride : integer, get/set

If nonzero, the rule of a previously focused EditText object is overridden (the ListBox rule value combined with the EditText path is returned).

The default ruleoverride value is zero.

singleclick : integer, get/set

Specifies which action should activate a rule submission:

  • 3 (default) - rule submission on mouse button single click or UP/DOWN cursor keys, also on RETURN/ENTER and SPACE keys if enabled by the FocusTabMode configuration (see above)

  • 2 - rule submission on mouse button double click or UP/DOWN cursor keys, also on RETURN/ENTER and SPACE keys if enabled by the FocusTabMode configuration (see above)

  • 1 - rule submission on mouse button single click, also on RETURN/ENTER and SPACE keys if enabled by the FocusTabMode configuration (see above)

  • 0 - rule submission on mouse button double click, also on RETURN/ENTER and SPACE keys if enabled by the FocusTabMode configuration (see above)

Application attributes

The eloqwebd configuration parameters below may now be modified through the Application object for the current session:
  • [Session] Expires
  • [HTML] EnableAjax
  • [HTML] SelectOnFocus
  • [HTML] RuleOnChange
  • [HTML] XRaster, YRaster
  • [HTML] ExtCharset
  • [HTML] PopupBorder
expires : integer, get/set

Number of seconds until DLG a session expires.

During a DLG DO or POPUP BOX command, this is the maximum idle time until an error #684 is returned.

This allows to override the global eloqwebd [Session] Expires configuration parameter.

The default value is 3600 seconds (1 hour) unless the eloqwebd [Session] Expires parameter is otherwise configured.

enableajax : integer, get/set

The Ajax functionality allows dynamic updates of HTML dialogs without reloading the HTML page. Depending on this setting, the Ajax functionality is enabled or disabled for the current session.

  • 0 - Ajax functionality is disabled
  • 1 - Ajax functionality is enabled if supported by the browser

The default value is 1 unless the eloqwebd [HTML] EnableAjax parameter is otherwise configured.

Please note that the current dialog must be refreshed or a new dialog must be displayed before a modified enableajax setting comes into effect.

selonfocus : integer, get/set

Specifies whether the content of EditText fields are selected on focus. Valid attribute values are:

  • 0 - don't select anything
  • 1 - select single-line EditText
  • 2 - select multi-line EditText
  • 3 - select both single- and multi-line EditText

This allows to override the global eloqwebd [HTML] SelectOnFocus configuration parameter.

The default value is 1 unless the eloqwebd [HTML] SelectOnFocus parameter is otherwise configured.

ruleonchange : integer, get/set

Specifies whether an EditText rule is triggered when the content changes. Valid attribute values are:

  • 0 - rule is triggered when EditText loses focus
  • 1 - rule is triggered when EditText content changes

This allows to override the global eloqwebd [HTML] RuleOnChange configuration parameter.

The default value is 0 unless the eloqwebd [HTML] RuleOnChange parameter is otherwise configured.

xraster : integer, get/set
yraster : integer, get/set

Specifies the width and height of a character cell, used for internal coordinate calculations.

The xraster/yraster unit is a 10th of a pixel to allow for sub-pixel raster sizes. For example, to specify a 10.5 pixel raster size, a value of 105 must be used.

This allows to override the global eloqwebd [HTML] XRaster and YRaster configuration parameters.

Unless the eloqwebd [HTML] XRaster and YRaster parameters are otherwise configured, the xraster default value is 90 (9 pixels) and the yraster default value is 180 (18 pixels).

extcharset : string, get/set

Specifies the character set encoding of external files which are accessed using the .file attribute. Supported attribute values are:

  • "HPROMAN8" - external files' encoding is HP Roman 8
  • "ISO8859-1" - external files' encoding is ISO 8859-1

This allows to override the global eloqwebd [HTML] ExtCharset configuration parameter.

The default value is "HPROMAN8" unless the eloqwebd [HTML] ExtCharset parameter is otherwise configured.

popupborder : integer, get/set

Specifies the border width of POPUP BOX objects in pixel units.

If set to 0, the border width can be specified with a CSS definition for the .eq_popup_box class.

This allows to override the global eloqwebd [HTML] PopupBorder configuration parameter.

The default value is 3 unless the eloqwebd [HTML] PopupBorder parameter is otherwise configured.


System authlogin and authpassword attributes

Added the System authlogin and authpassword attributes.
authlogin : string, get

Returns the user name if HTTP Basic Authentication is used.

authpassword : string, get

Returns the password if HTTP Basic Authentication is used.


System useragent type and version attributes

Added the System useragent, useragentvmajor and useragentvminor attributes. These attributes allow to query the type and version of the user-agent, usually the user's web browser.
useragent : string, get

Returns the type of the user-agent, usually the identifier or brand of the user's web browser.

For example, "IE" is returned for Microsoft Internet Explorer, "Firefox" is returned for Mozilla Firefox.

useragentvmajor : string, get

Returns the major version of the user-agent. This is usually a numeric value, for example "16".

useragentvminor : string, get

Returns the minor version of the user-agent. This is usually a numeric value, for example "0".


EqSubmit JavaScript API

The EqSubmit() JavaScript API allows to issue a rule submission from user-defined JavaScript code or from a hyperlink.
  void EqSubmit(rule, path)
Issues a rule submission to the program. The rule and path values are returned to the program.

rule - rule value (numeric)
path - object path (string)

Note: The Dialog object addressed by the path argument must exist, otherwise the rule/path values are not submitted to the program.

Example 1: Invoking EqSubmit() from user-defined code

EqSubmit(205, 'MyDialog.GroupBox.Object');
Example 2: Invoking EqSubmit() from a hyperlink
<a href="javascript:EqSubmit(1,'MyDialog')"> ... </a>

JavaScript functions cached

By default, the generated JavaScript functions are now provided in a separate session-specific document, i.e., the JavaScript functions are no longer part of the HTML document containing the Dialog.

This may improve performance if the browser keeps the compiled functions in memory, depending on the browser capabilities.

The new [HTML] JsInline eloqwebd configuration parameter may be used to globally disable this feature if desired:

[HTML] JsInline

  • Zero (default): The JavaScript functions are provided in a separate session-specific document.
  • Nonzero: The JavaScript functions are part of the HTML document containing the Dialog, as in previous WEBDLG versions.

misc

  • ListBox, PushButton, CheckBox and RadioButton objects may now be triggered by the RETURN/ENTER and SPACE keys, depending on the FocusTabMode configuration (see above, may depend on the browser implementation).

  • Improved browser caching of spacer image files and the session- specific JavaScript document.

  • Changed the default value of the [HTML] RuleOnChange eloqwebd configuration parameter to zero.

    The reason for this change is the improved Dialog performance caused by the new Ajax functionality, which makes the previous nonzero RuleOnChange default value no longer necessary.


 
 
.
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision:  2012-11-19  
  Copyright © 2011 Marxmeier Software AG