APPENDIX 3A - Applet features
Topics in this section:
3a.1 - Main iWEB Runtime flow

The picture in Figure 3a-01 provides a rough picture of how the iWEB Runtime works.
At a given moment
- the user at the remote client (PC) is looking at a WEB page
- that WEB page was drawn by the iWEB Runtime Java Applet
- the iWEB Runtime Java Applet executes within an Internet Browser (usually Microsoft Internet Explorer, Netscape Navigator, Mozilla Firefox, or Opera)
- the Internet Browser communicates (on Applet request) with the iSeries server.
- The communication protocol is Common Gateway Interface (CGI).
- The communication to the iSeries server is through the iSeries port specified on the browser address line.
- on the iSeries server, the HTTP TCP server is active (it could be the old Original HTTP server, or the newer HTTP server powered by Apache)
- within the HTTP server, the iWEB Runtime instance is active and receives requests from the client coming from the appropriate port
- a request from the client is served by one of several CGI batch jobs serving the iWEB Runtime HTTP instance
- the CGI job of the iWEB Runtime HTTP instance communicates via user spaces with an IWEB batch job in subsystem QSYSWRK
- this last job is executing a 5250 interactive program, iWEB-converted and currently running in batch execution mode
- the program is expecting some terminal input just after an RPG pseudo-EXFMT instruction.
Let us now see what happens when the remote user presses the Enter key.
- The Java Applet sends - trough the Internet Browser - a CGI request to the appropriate iSeries server port
- the HTTP server assigns the CGI request to the iWEB Runtime HTTP instance
- the iWEB Runtime HTTP instance routes the CGI request to the first idle CGI serving job
- the CGI serving job posts the request to the appropriate QSYSWRK batch job
- the appropriate QSYSWRK batch job (the user program converted to iWEB) wakes up, reads the pseudo-worstation input buffer, performs the due logic, and provides the response (another screen) through another pseudo-EXFMT instruction.
The pseudo-EXFMT instruction posts the output data via user spaces to the HTTP CGI serving job of the iWEB HTTP instance, that was waiting for an answer.
- The HTTP CGI serving job of the iWEB HTTP instance sends out the response in CGI mode
- The response comes to the remote browser, is passed to the Java Applet
- The Java Applet draws the appropriate graphic page.
3a.2 - Running the Applet From an HTML page
Once Runtime is installed, the Java Applet is the IFS stream file /iwebdata/applet/iWeb.jar .
In a normal iWEB Runtime installation, this applet is invoked from the iWEB Runtime welcome (home) HTML page.
However, this applet may be called from any html page of a site, provided that the HTML script used to call it, is added to such page site.
Examples of such scripts can be found (once Runtime is installed) in:
/iwebdata/index_0.html |
the applet occupies the whole page |
/iwebdata/index_1.html |
the applet has a smaller dimension and is inside an html template |
/iwebdata/index_2.html |
same as above with different template |
It should be noted that the applet file (e.g. /iwebdata/iWeb.jar) and the html script calling the applet (e.g. /iwebdata/index_0.html ) must belong to the same directory (e.g. /iwebdata).
Examples:
3a.3 - Customizing the Java Applet
Parameters that can be added to change some applet defaults:
- appletBgColor (background color of the applet window)
format: <param name="appletBgColor" value="rgb hex code">
- frameBgColor (background color of the "5250" window)
format: <param name="frameBgColor" value="rgb hex code">
- fontsize (font point size, for a given combination of screen resolution & 5250 lines/columns)
format: <param name="font size name" value="point value">
where
| font size name |
screen resolution |
5250 lines/columns |
| fontSize60080 |
600 x 480 |
24 x 80 |
| fontSize600132 |
600 x 480 |
27 x 132 |
| fontSize80080 |
800 x 600 |
24 x 80 |
| fontSize800132 |
800 x 600 |
27 x 132 |
| fontSize102480 |
1024 x 768 |
24 x 80 |
| fontSize1024132 |
1024 x 768 |
27 x 132 |
| fontSize128080 |
1280 x 1024 |
24 x 80 |
| fontSize1280132 |
1280 x 1024 |
27 x 132 |
example: <param name="fontSize102480" value="14.5">
- user (force the applet to use a default userID and bypass login-prompt)
format: <param name="user" value="userID">
- password (force the applet to use a default userID - set the password)
format: <param name="password" value="password">
- inputCall (force the applet to call directly a command - specified in param name="prgCall" - rather than using the USRPRF INLMNU or INLPGM)
format: <param name="inputCall" value="1">
- prgCall (command to be called when param name="prgCall" value="1"
format: <param name="prgCall" value="CALL PGMABC PARM('A')">
- sessionName (name of the iWeb session on WRKACTJOB )
- ViewSpool (set '0' or 'NO' not to see spool file button on top toolbar)
Default = "yes"
- ViewLngButt (set '0' or 'NO' not to language menu on top toolbar)
Default = "yes"
- ViewIexplore (set '0' or 'NO' not to see iExplore button on top toolbar)
Default = "yes"
- ViewInfo (set '0' or 'NO' not to see applet information button on top toolbar)
Default = "yes"
- keybarSpoolButton (set 1 or YES or SI to see spool file button on command function bar)
Default = "no"
- antiAlias (set 1 or YES or SI to see better characters rendering)
Default = "no"
- buttonsForeground (sets command function buttons foreground color in hexadecimal format)
Ex.: "0000FF" blue
- buttonsBackground (sets command function buttons background color in hexadecimal format)
Ex.: "FF0000" yellow
- progressBar (set '0' or 'NO' not to see applet starting progress bar)
Default = "yes"
- fieldButtonsOnFocus (set 1 or YES or SI to see FIELDBUTTONS only when master field has focus)
Default = NO
- template
sets style template to be used by iWeb session. Template must be built with iWebMaster commands.
Basically it is a path to an xml file defined in 3 ways:
- absolute. Ex.: http://www.something.com/template.xml
- absolute inside domain/IP . Ex.: "/iwebdata/obj/collection/template.xml" - Template will be searched in the path made joining domain/IP and port of the page containing the applet with parameter value. Ex.: "http://100.100.100.100:8010/iwebdata/obj/collection/template.xml"
- relative. Ex.: "collection/template.xml" - Template will be searched in directory /iwebdata/obj/
- dftEdtCde
It forces an EDTCDE, for all not edited numeric fields with keyboard shift attribute S.
format: <param name="dftEdtCde" value="J">
allowed values are codes 1 to 4 and J to Q. They have the same meaning of the parameter of the keyword EDTCDE.
- resizeButtonIcons
by default iWeb resizes icons inside buttons according to button size.
Set '0' or 'NO' to leave icons with their original size.
Default = "yes"
- layout
Set this to 'FIXED' to let iWeb draw the display with an underlying table of fixed size cells. This way the position of the fields is closer to the 5250 one.
- layoutCell
it sets the dimension of the underlying table cells when layout parameter (see above) is set to FIXED .
Its format is 2 numbers separated by space. The first is the width and the second is the height (in pixels) of each cell of the underlying table.
format: <param name="layoutCell" value="12 22">
Default = "10 20";
- sflToXls
it lets iWeb show a little button on the bottom-right side of any subfile/table. If clicked it will open a new .xls file containing all data from the subfile/table.
format: <param name="sflToXls" value="1"> (1/yes/si/sė = setted; 0/no = unsetted)
Default = "no";
- doNotSortEmptyRows
The default iWeb behaviour when sorting table columns is to place empty values on top (which is the standard behaviour in web/graphic applications). With this parametere setted to 1/yes/si/sė you can force iWeb to totally ignore empty rows when sorting columns. This can be useful when you have subfiles with many empty rows.
format: <param name="doNotSortEmptyRows" value="1"> (1/yes/si/sė = setted; 0/no = unsetted)
Default = "no";
- showCompany
With this parametere setted to 1/yes/si/sė iWeb shows the Company name on top of the menu.
format: <param name="showCompany" value="1"> (1/yes/si/sė = setted; 0/no = unsetted)
Default = "no";
- allowImgDistortion
The default iWeb behaviour when showing images is to always keep images aspect ratio even if you give non proportional width and height values. With this parametere setted to 1/yes/si/sė iWeb follow your specifications allowing image distortion.
format: <param name="allowImgDistortion" value="1"> (1/yes/si/sė = setted; 0/no = unsetted)
Default = "no";
3a.4 - Other Java Applet behaviors
Navigation
When you do one of the following:
- press the browser back or forward buttons
- link to another page
the Java Applet saves its status.
When the browser comes back to the Applet page, the Applet page is restored, except the data you may had keyed in the input fields.
Instead, if the browser is closed, it is no longer possible communicate with the iWEB batch application job in the QSYSWRK subsystem (see Figure 3a-01).
The job will sit there for some time before being automatically ended (timeout detected by the CGI job).
See however the effect of the backAndForward parameter in the previous topic.
Opening a new browser window
You can start as many browser sessions running the iWEB Runtime java applet, as you like. Each browser session (window) will be in communication with a different iWEB batch application job in the QSYSWRK subsystem (see Figure 3a-01).
However, if you from a browser-applet session (window) you happen to open another browser-applet session (window), the two windows will be both communicating to the same iWEB batch application job in the QSYSWRK subsystem, which may result to some obvious problem.
|
| |