A presentation space can be either formatted or unformatted. In a formatted presentation space, the data generally appear in individual fields. In an unformatted presentation space, the data generally appear as continuous lines of text on the screen. This topic describes how field attributes define fields in a formatted presentation space.
|The Viewer API cannot modify the field or extended attributes; it can only read the attributes using the findField, findFieldEx, and getExtPS methods.|
Each field has attributes that define the type of information that can be typed in that field, as well as the appearance of the field on the screen. For example, field attributes can specify the following types of information:
|Failure to take these attributes into account can cause your application to send erroneous data to the host.
Design your client applications so that you can easily modify them to conform to changes in the host application. For example, if your application expects a particular prompt, it will likely fail if even a single character of the prompt is changed. In this case, you must change your application to match the host application.
Refer to the following topics for details on field attributes and extended attributes:
Many Viewer API methods interact with fields. For example, your application can perform the following tasks:
The Viewer API methods identify fields by detecting certain changes in the attributes of each field. The attributes that define fields are unique to each host. For example, a field label might be blinking, but these character attributes do not indicate the beginning of a new field.
The following table lists the attributes of each host and whether or not they denote a field.
|Terminal Type||Attributes||Denote New Field?|
|T27||Protected text, Protected field, Unprotected field, Left and Right Justified||Yes|
|Intensity (Normal and Bright), Blinking, Reverse Video, Secured (video off)||No|
|UTS||Protected area, Unprotected area, Numeric only data, Alphabetic only data, Left and Right Justified||Yes|
|VT||Normal, Bold, Blink, Reverse Video, Invisible, Underscore, Line attributes (double width, double height)||Yes|
|TopBottom, Foreground color||No|
|For VT host sessions, every field is unprotected. Also, the TopBottom attribute is only valid if the line attributes are set to double width/double height. This attribute indicates which half of the text is being shown. Normally, a new line always denotes a field change, but not when the next line is the bottom half of a double height line.|
When your application sends keystrokes (using the sendKeys method) to an unprotected field in a formatted presentation space, the cursor automatically skips to the beginning of the next available field after data is entered in the last character space of a field.
The only exception is when the field attribute of the next available field is set for protected mode and numeric data types. Protected numeric fields are called auto-skip fields; the cursor bypasses them for the next unprotected field.
You must consider these fields when using the sendKeys method, since this method inserts keystrokes in the presentation space at the current cursor location.
|Viewer API, Overview|
|The Presentation Space, Overview|
|Standard Presentation Space Sizes|