Defining table display panels
A table display panel is a special panel that is processed by the TBDISPL service. When it is displayed, it has a fixed (nonscrollable) portion followed by a scrollable table portion. The fixed portion is defined by the )BODY section in the panel definition. The scrollable portion is defined by the )MODEL section.
The fixed portion contains the command field and usually the scroll amount field. It can also include other input fields as well as output fields, action bars, text, dynamic areas, scrollable areas, and a graphic area.
The scrollable portion is defined by up to eight model lines. These lines describe how each table row is to be formatted within the scrollable data area. Attribute characters in the model lines indicate whether each field is protected or user-modifiable.
If a single model line is specified in the panel definition, each row from the table corresponds to the format of that line. This results in scrollable data that is in tabular format. For many applications, it may be useful to define the left-most column in each line as an input field. The application user can enter a code to be used by the dialog function to determine the particular processing for that row.
If multiple model lines are specified in the panel definition, each row from the table corresponds to multiple lines on the screen. If desired, a separator line, consisting of blanks or dashes, for example, can be specified as the first or last model line. This format may be useful for address lists or other repetitive data in which each unit will not fit on a single line.
Each definition using the model lines on the display is known as a model set.