Troubleshooting
Problem
This document is written to address how the IBM i Access for Web application might render a 5250 interface session.
Resolving The Problem
This document is written to address how the System i Access for Web application might render a 5250 interface session. In the document, we will answer some common questions and issues regarding rendering.
Input Fields
When we generate the HTML for the screen area, we set the size and the maximum length of the text input field (an <INPUT type="text" ...> HTML element). The field is limited to the number of characters we specify for the maximum length; however, it is the Web browser that decides what size to render the edit field control when the page is displayed. The Web browsers do some calculation based on the font and font size to determine the actual size of the control. Some Web browsers do a better job than others of matching the requested size.
Note: Keep in mind that there will be some extra size to the edit field because it is a control and not just text being displayed (so there is the border, and so on).
- In our V5R3M0 and previous releases, the fixed width font is not used in the text input fields. The way we generated the HTML did not give us a means of controlling the font used by the edit field. Therefore, the Web browser does the size calculation based on a variable width font. This often causes your session to be rendered with larger input fields because they must account for the wide characters. In summary at this release, the Access for Web application is relying on the Web browser to render the fields. If all else fails, you should try a different Web browser.
- In our V5R4M0, V6R1M0, V7R1M0 and V7R2M0 releases, Access for Web has changed the way it can generate the HTML and can tell the edit field to use a fixed width font. Since the Web browser will also use the fixed width font for the edit field, the calculation can give a better or more desirable result. However, as mentioned previously, there will be some extra size to the edit field because it is a control and not just text being displayed (so there is the border, and so on). In summary, our newer releases do continue to rely on the Web browsers to render the fields. However, there is a new option available when configuring the session called: Display text using fixed width font = This setting controls whether the 5250 user interface session uses a fixed width font or a proportional font. This assists the Web browser to render a more desired outcome. If all else fails, try a different Web browser.
Note: In our sixth release of the product, we have never seen problems in our code regarding this topic. However, if there were a need to investigate this further, the following data must be obtained:
o HTML output of the page in question
o Access for Web trace (Informational, Diagnostic, Warning options selected)
o http://<system name or ip address>:port/webaccess/iWAInfo - output
o Screen shots of incorrectly rendered page(s)
High Resolution or Wide Screen Monitors
In most common scenarios when using wide screen or high resolution monitors, the 5250 interface in Access for Web is rendered with very small dimensions. For example, on a desktop or screen size set to 1920x1200 resolution, the 5250 session is rendered in a 3x5 inch screen size, even when the Web browser has been maximized.
The main reason this is rendered with these dimensions is that the font is not going to scale based on the window size in comparison to IBM i Access Client Solutions 5250 or IBM i Access for Windows PC5250 emulators. Internet Web browsers do not work in this manner. Additionally, System i Access for Web cannot control the pages to try to adjust the font size. Therefore, the application is working as designed.
In some cases, our clients have changed the font size of their Web browser; however, as you can expect, this changes all content displayed using the Web browser, for any and all pages displayed or rendered. This may or may not be applicable to your environment. If all else fails, try a different Web browser.
| Important Note: Currently, there is no way for the IBM i Access for Web application in any release to control what or how the Web browser renders the screen size. |
An undocumented work-around to this issue can be accomplished by using a custom template to include your own style sheet after the IBM supplied style sheets. Cascading Style Sheets (CSS) are a simple mechanism for adding style (for example, fonts, colors, spacing) to Web documents.
In this template, you would want to override the font-size attribute of the .iwa-content and .iwa-content TD selectors. This would allow you to change the style of the page rendered in the 5250 screen area. Additionally, the .iwa-content TH selectors can be altered; if they are altered, this would affect the font size of all Access for Web pages, not just the 5250 screen area.
Steps taken to test this work-around are as follows.
To customize the IBM-supplied template to include a custom style sheet, do the following:
| o | Copy /QIBM/ProdData/Access/Web2/html/webaccess.html to some other location in the Integrate File System. Ensure that the profile the application server job is running under can read files in that directory. (This will depend on the type of application server you are using for environment-possible profiles: QLWISVR, QTMHHTTP, or QEJBSVR.) |
| o | Add a reference to the custom style sheet to the copy of the template. It should be placed immediately after the line containing %%STYLESHEET%% so that it is included after our default style sheet. It should look something similar to the following (the third line was added): <TITLE>%%TITLE</TITLE> %%STYLESHEET%% <LINK rel="stylesheet" type="text/css" href="styles.css"> |
| o | The CSS should have the following content. There are a number of ways to specify the font size to use. This example uses one of the CSS literals. You can also use percentages or point sizes. You should refer to the font size information in a CSS reference for details. .iwa-content form table[dir=ltr] td { font-size: x-large; } |
| o | Once the files have been created or modified and are in place, change the Template HTML file policy in the General category to point to the new template. |
Using this information, an example is provided as follows. I used my profile JRTALAMA and IFS directory /QIBM/JRTALAMA/template.html, as shown below:
Example files Caution: The example files in this document are not intended for any development or production environment. They are only provided as an example and an as-is basis. This solution does not work with Internet Explorer 6 or 7 Web browser. At the time this document was written, it was tested to work with Firefox v3.0.5, Opera v9.63, and Safari v3.2.1.


Historical Number
514196674
Was this topic helpful?
Document Information
Modified date:
11 November 2019
UID
nas8N1013210




