Basic Properties - Screen
axScreenBasicProperties
Description
Screen level basic properties apply to an entire screen.
Properties
|
Name |
Description and Comments |
JavaScript |
Shipped default |
|---|---|---|---|
|
firstElementToFocus |
Indicates which element on the screen will get the focus when the screen arrives: Options: Follow the original 5250 screen. Set focus on element with the lowest tab index. |
Yes |
Follow original 5250 screen |
|
disableAutoGUI |
Indicates whether AutoGUI is enabled for the screen. This property is only valid for screens generated with the aXes-TS2 rendering engine. AutoGUI is always disabled for customized screens in aXes-TS. |
No. |
False. |
|
disableTerminalKeys |
Indicates whether terminal keys (for example function keys F1 – F24) should be disabled. When terminal keys are disabled, physical keys typed in by users are ignored by AXES. Keys submitted programmatically using SENDKEY function will still be processed by AXES. This setting is not recommended to be used under normal circumstances. Instead please refer to this script: Can I stop the user pressing a function key? |
No. |
False. |
|
keepLegacy5250FFW |
Indicates whether to apply the legacy 5250 Field Format Word to input elements so that they emulate the behaviour of a 5250 terminal. |
Yes. |
False. |
|
keepPopupLocation |
Where a customized 5250 screen is a 5250 pop-up window you may use this property to maintain its 5250 location (if set to true) or to cause it to be moved to the top left of the display area (if set to false). This does not apply to the aXes-TS2 rendering engine. The user can drag the window out of the way instead. |
No. |
True. |
|
limitedCursorSupport |
aXes emulates a 5250 screen cursor. When a screen is customized by eXtensions most of the time cursor use does not make any sense anymore as the fields would have been moved around. There might be occasions where only a very minor modifications are made to the screen and cursor is essential for the operation of that screen. In this case limitedCursorSupport can be turned on (set to true). The cursor support is limited in a sense that: The cursor positioning is based on the original position of the 5250 elements, so if you move the element the cursor will not have any awareness of it. The cursor will always be visible even when it is in an edit box. |
No. |
False. |
|
name |
The name of the screen |
No |
None. |
|
onArrive |
JavaScript code that is to be executed every time the 5250 screen arrives. |
Yes. |
None. |
|
onLeave |
JavaScript code that is to be executed every time the 5250 screen departs.
ENV members: ENV.key: indicates what key triggered the event. Please refer to the key symbolic names table in the examples section.
Return value: Set to false to prevent the screen from leaving.
|
Yes. |
None. |
|
onReady |
JavaScript code that is to be executed every time layout render of all extension is completed. |
Yes. |
None. |
|
style |
Style elements that should be applied the body of the screen. |
Yes. Must return a valid style object. |
None. |
|
useTerminalStyles |
Indicates whether the normal aXes CSS style sheets should be applied to this screen. |
No. |
False. |
Notes, Comments and Warnings
You should not use alerts and any other operation that halts or interrupts the execution of JavaScript code during the arrival or departure of a screen.
Departure code may not be executed in an abnormal termination.
Examples
Tracing
Specify this code in the onArrive property:
TRACE("**** MY ONARRIVE CODE IS EXECUTING. ****");
Specify this code in the onLeave property:
TRACE("**** MY ONLEAVE CODE IS EXECUTING. ****");
Specify this code in the onReady property:
TRACE("**** MY ONREADY CODE IS EXECUTING. ****");
Now execute your aXes application with trace mode turned on.
You should see trace statements indicating that your code has been executed.
Disabling certain function keys
Specify this code in the onLeave property to disable the F1 & F4 keys:
if(ENV.key == "F4" || ENV.key == "F1")
{
ENV.returnValue = false;
}
The following table lists the symbolic names for the keys (the symbolic names are the values that are to be used for comparison with ENV.key):
|
Key |
ENV.key value |
|---|---|
|
F1 – F24 |
F1 – F24 |
|
Enter |
ENTER |
|
Roll Down (Page Up) |
ROLLDOWN |
|
Roll Up (Page Down) |
ROLLUP |
|
Roll Left |
ROLLLEFT |
|
Roll Right |
ROLLRIGHT |
|
Clear Screen |
CLEARSCREEN |
|
PA1 |
PA1 |
|
PA2 |
PA2 |
|
PA3 |
PA3 |
|
Help |
HELP |
|
|
|
See Also
Tutorial 12 - FAQ and Examples
-
My popup is making use of the cursor to allow the user to select an item from a list, how will this work after the screen has been customized as the cursor does not show anymore?
