The property
selectedIndexItem
is used for a VGUI-field array and refers to the
selected index item,
which is a VGUI field whose value indicates two aspects of runtime processing:
- Whether a control (such as a check box) is pre-selected when the Web page
is displayed
- Whether the user selected a control
The field to which the property refers must be of type NUM and must be
without decimal places, but may be an array.
Consider the following case:
- A VGUI record field is an array and has a selectedIndexItem property
that refers to a field (the selected index item) that is not an array
- The uiType property is input or inputOutput
In this case, the generated Web page contains radio buttons from which
the user can choose only one value. The selected index item identifies the
radio button by number, with the number 1 referring to the first radio button.
If the selected index item is an array in the same case, the generated
Web page contains a set of checkboxes, and the following is true:
- When data is being prepared for display, the array contains the indexes
of the entries to be set as pre-selected
- When data is returned, the array contains the indexes of the entries that
the user selected. For example, if the user selected displayed entries with
indexes 1, 3, and 5, for example, the first element of the array contains
1, the second element contains 3, the third contains 5, and the rest contain
0.
The generated HTML is different if the uiType property is output:
- If the selected index item is not an array, the generated Web page contains
a pair of structures—the item label, which is displayed in boldface, and an
HTML <SELECT> structure (seen as a drop-down list), from which the user
can choose one value. If the selected index item has a value of 2, for example,
the second entry is pre-selected.
- If the selected index item is an array, the generated Web page contains
a similar pair of structures, but the user can choose multiple values. If
the value of the first element in the selected index item is 1 and
the value of element 2 is 3, the browser displays a drop-down list, and the
first and third entries are pre-selected.