Document revision: 2024-10-28
Refers to WEBDLG2 version: B0840 2409-1
This page lists ready-to-use WEBDLG2 plugin examples.
Please note:
The minimum Eloquence B.08.40 version required by the plugin examples listed
here is 2405-2.
The required minimum Eloquence B.08.30 WEBDLG2 patch is
PE83-2405230.
Table of contents
The Datepicker plugin
The Datepicker plugin example demonstrates the implementation of
a datepicker object class.
The datepicker displays a specified date or the current date in
the representation of the current
locale.
It provides an integrated calendar to conveniently modify the date.
Attributes
- date : string, get/set
- The date is set or returned in a format as specified by the
format attribute (see
below).
By default (if the date is not set, or if it is set to the empty string),
the datepicker displays the current date.
- format : string, get/set
- The format used to set or get the date. The format string is
parsed for special letters which are replaced by the date components
as documented below:
Format | Date Component | Example |
yyyy | Year | 2022 |
yy | Year | 22 |
MM | Month in year | 04 (April) |
M | Month in year | 4 (April) |
dd | Day in month | 01 |
d | Day in month | 1 |
The default format is dd.MM.yyyy.
Download and installation
- HP-UX, Linux
- Download:
webdlg2-datepicker.240705.tgz
Installation (as superuser):
cd /directory/in/web/server/document/hierarchy
tar xzf /path/to/webdlg2-datepicker.240705.tgz
- Windows
- Download:
webdlg2-datepicker.240705.zip
Please unpack the webdlg2-datepicker.240705.zip contents into the
web server document hierarchy.
- The datepicker plugin example consists of the files:
- webdlg-datepicker.js (JavaScript code)
- webdlg-datepicker.min.js (JavaScript code, minified)
- webdlg-datepicker.map (JavaScript source map)
- webdlg-datepicker.css (CSS rules)
- webdlg-datepicker.min.css (CSS rules, minified)
To use the plugin in your WEBDLG2 applications,
configure an URI in the
eloqwebd2.uri file for the
directory containing the plugin files, for example:
[/plugin]
Path = /directory/in/web/server/document/hierarchy
This configuration associates the /plugin URI with the plugin
directory in the file system. Now the
application can be configured to
load the plugin by setting
PluginURL
as shown below:
PluginURL = /plugin/webdlg-datepicker.min.js
PluginURL = /plugin/webdlg-datepicker.min.css
Alternatively, the plugin files may be integrated into the
HTML documents. This is necessary
when using an external web server.
For example:
<script async
src="/path/to/webdlg-datepicker.min.js">
</script>
<link href="/path/to/webdlg-datepicker.min.css"
rel="stylesheet" type="text/css">
As shown here, using the <script async> attribute is recommended
to avoid that the script potentially delays loading the document
(1).
Example program
An example program is available for download, consisting of the files
Datepicker.PROG and Datepicker.dlg.
- HP-UX, Linux
- Download:
datepicker-example.tgz
- Windows
- Download:
datepicker-example.zip
Customizing the visual appearance
To allow overriding the default color scheme,
a CSS template is available for download:
webdlg-datepicker-theme-colors.css
For details, please refer to the customizing
the visual appearance document.
The Editgrid plugin
The Editgrid plugin example demonstrates the implementation of
an editable grid object class.
The grid consists of cells, organized in rows and columns, where
a column may be specified as editable or readonly, which affects
all cells in the column.
The Editgrid rule value is issued to the program when TAB or ENTER
is pressed in an editable cell or when editing a cell has finished.
Attributes
- activeline : integer, get/set
- activecolumn : integer, get/set
- The 1-based activeline and activecolumn attributes specify
the cell which has the keyboard focus.
If zero, no cell has the keyboard focus.
The cx/cy
attributes are aliases for activecolumn/activeline
(see below).
- add : string, set
- Adds a new row to the grid.
Columns are separated by the delimiter specified by the
delim attribute.
The first column is the row header.
- cell[][] : string, get/set
- Gets or sets the content a the specified cell.
The cell is specified by the 1-based row and column index,
for example:
DLG SET "Dialog.grid.cell[2][4]","Row 2 Column 4"
Column index 0 addresses the row header.
- clear : integer or string, set
- Deletes all rows in the grid. The argument is ignored.
- colreadonly[] : integer, get/set
- Read-only state of the column specified by the 1-based
column index.
Zero: The column is editable.
Nonzero: The column is read-only.
The default value is zero (column is editable).
- columns : integer, get/set
- Number of columns, must be specified before setting the
grid content.
- colwidth[] : integer, get/set
- Width of the column specified by the 1-based column index
in Dialog raster character cell units.
The default column width is 5.
- content : string, get/set
- Gets or sets all rows at once.
Rows are separated by LF (ASCII 10), columns are separated by the
delimiter specified by the
delim attribute.
The first column of each row is the row header.
- cx : integer, get/set
- Alias for the activecolumn
attribute (see above).
- cy : integer, get/set
- Alias for the activeline
attribute (see above).
- del[] : integer, set
- Deletes the specified number of rows, starting with the
1-based row index.
- delim : string, get/set
- Column values are separated by this delimiter.
By default, the TAB character (ASCII 9) is used.
- header[] : string, get/set
- Header of the column specified by the 1-based column index.
Column index 0 addresses the header for the row header column.
- insert[] : string, set
- Inserts one row at the specified 1-based row index.
Columns are separated by the delimiter specified by the
delim attribute.
The first column is the row header.
- line[] : string, get/set
- Sets or gets the row specified by the 1-based row index.
Columns are separated by the delimiter specified by the
delim attribute.
The first column is the row header.
Download and installation
- HP-UX, Linux
- Download:
webdlg2-editgrid.231128.tgz
Installation (as superuser):
cd /directory/in/web/server/document/hierarchy
tar xzf /path/to/webdlg2-editgrid.231128.tgz
- Windows
- Download:
webdlg2-editgrid.231128.zip
Please unpack the webdlg2-editgrid.231128.zip contents into the
web server document hierarchy.
- The editgrid plugin example consists of the files:
- webdlg-editgrid.js (JavaScript code)
- webdlg-editgrid.min.js (JavaScript code, minified)
- webdlg-editgrid.map (JavaScript source map)
- webdlg-editgrid.css (CSS rules)
- webdlg-editgrid.min.css (CSS rules, minified)
To use the plugin in your WEBDLG2 applications,
configure an URI in the
eloqwebd2.uri file for the
directory containing the plugin files, for example:
[/plugin]
Path = /directory/in/web/server/document/hierarchy
This configuration associates the /plugin URI with the plugin
directory in the file system. Now the
application can be configured to
load the plugin by setting
PluginURL
as shown below:
PluginURL = /plugin/webdlg-editgrid.min.js
PluginURL = /plugin/webdlg-editgrid.min.css
Alternatively, the plugin files may be integrated into the
HTML documents. This is necessary
when using an external web server.
For example:
<script async
src="/path/to/webdlg-editgrid.min.js">
</script>
<link href="/path/to/webdlg-editgrid.min.css"
rel="stylesheet" type="text/css">
As shown here, using the <script async> attribute is recommended
to avoid that the script potentially delays loading the document
(1).
Example program
An example program is available for download, consisting of the files
Editgrid.PROG and Editgrid.dlg.
- HP-UX, Linux
- Download:
editgrid-example.tgz
- Windows
- Download:
editgrid-example.zip
Customizing the visual appearance
To allow overriding the default color scheme,
a CSS template is available for download:
webdlg-editgrid-theme-colors.css
For details, please refer to the customizing
the visual appearance document.
The Filetransfer plugin
The Filetransfer plugin example demonstrates methods to transfer files between
an application and the a user's system via the web browser. Please refer to the
example program for details.
Download and installation
- HP-UX, Linux
- Download:
webdlg2-filetransfer.240222.tgz
Installation (as superuser):
cd /directory/in/web/server/document/hierarchy
tar xzf /path/to/webdlg2-filetransfer.240222.tgz
- Windows
- Download:
webdlg2-filetransfer.240222.zip
Please unpack the webdlg2-filetransfer.240222.zip contents into the
web server document hierarchy.
- The filetransfer plugin example consists of the files:
- webdlg-filetransfer.js (JavaScript code)
- webdlg-filetransfer.min.js (JavaScript code, minified)
- webdlg-filetransfer.map (JavaScript source map)
To use the plugin in your WEBDLG2 applications,
configure an URI in the
eloqwebd2.uri file for the
directory containing the plugin files, for example:
[/plugin]
Path = /directory/in/web/server/document/hierarchy
This configuration associates the /plugin URI with the plugin
directory in the file system. Now the
application can be configured to
load the plugin by setting
PluginURL
as shown below:
PluginURL = /plugin/webdlg-filetransfer.min.js
Alternatively, the plugin files may be integrated into the
HTML documents. This is necessary
when using an external web server.
For example:
<script async
src="/path/to/webdlg-filetransfer.min.js">
</script>
As shown here, using the <script async> attribute is recommended
to avoid that the script potentially delays loading the document
(1).
Example program
An example program is available for download, consisting of the files
Filetransfer.PROG and Filetransfer.dlg.
- HP-UX, Linux
- Download:
filetransfer-example.tgz
- Windows
- Download:
filetransfer-example.zip
|