
Creating a 5250 Component
35
About the ScreenDoc DOM
Whenever a Map Screen action executes, a new screen is displayed in the Native
Environment Pane (NEP). Each time a screen displays in NEP, an XML
representation of the screen is created in the ScreenDoc DOM. (To make this
DOM visible, you may need to select a View from the menu bar, then the Window
Layout choice next pick the XML Layout Tab, and finally move ScreenDoc to the
Visible list and click OK. To help locate the screen cursor position
programatically, each ScreenDoc Field returned by the TDS will have an attribute
named “cursor.” The attribute value of the cursor will be “false” for all the Fields
except one whose value will be “true.” To determine which Field has the cursor,
you can write an expression to check the cursor attribute and return the Field’s id
attribute as shown below.
In the sample list of ScreenDoc Fields in the above graphic, the XPath location
ScreenDoc.XPath (“SCREEN/FIELD[@cursor= ‘true’]/@id”) would return the
number “4” indicating that Field 4 is the current cursor location.
Each element also displays the following attributes for the field:
Table 3-2
Attribute Meaning
Column The screen column (1-80) where the field begins
starting from the left
Display Display attributes defined for the field in the TDS
(prot = protected, brt = bright, unprot =
unprotected, dark = dark, bypass = bypass)
Id An absolute sequence number representing the
fields position in the TDS