selectedRowItem

The selectedRowItem property identifies a variable that holds the index (or indices) for the row (or rows) the user selects from a screen display.

The value you assign to the property is an array of integer variables.

If you specify this property when declaring an array, the user is allowed to select multiple values. If you specify this property when declaring a primitive field, the user can select only one value.

To save the values of the selected rows rather than the indices, use the selectedValueItem property (see selectedValueItem).

Example

Picture the inbox of an email client. Next to the sender's name for each message is a check box; the column of check boxes is labeled "Delete." The messages are contained in an array of record variables based on the record definition MessageRecord. You cannot use a variable to specify the initial size of an array, so create the arrays at zero length and add elements as necessary:
mailMessages MessageRecord[0] {
  selectedRowItem = selectedRows };
selectedRows INT[0];

If the user selects the check boxes for the first, third, and fourth messages to be deleted, selectedRows will consist of three integers: 1, 3, and 4.

Compatibility

Table 1. Support for selectedRowItem property
Data item JSF handler VGUI record Console UI Text Form Java™ Text Form COBOL Print Form Java Print Form COBOL
Yes Yes No No No No No No

Feedback