Today with Personas 3.0 I wanted to select a maintenance plan ID from t-code IP18 and then run t-code IP10 for the selected maintenance plan.
My initial code was:
This worked fine as long as I selected a row from the table and I had not paged down or if I had not scrolled down.
Scrolling down resulted in an incorrect row being selected and paging down resulted in the following error:
Error during script execution:
getCellValue(): rowIndex '1' is outside the visible range. Set property firstVisibleRow properly.
Row selection is dependent on both a rows absolute position in a table and the rows position as displayed on the screen.
Example: entry X is at row 11 in a table that only displays 10 rows at a time on the screen. If you were to page down once on the table, entry X would be displayed at row 0 (remember java starts row count at 0 not 1) and entry X is still at row 11 in the table.
Find the row number of the first visible row (which is based on the visible rows position in the entire table not just what is displayed on screen) and add this to the value of the row number of the selected row(this row number is based on the entry's displayed row position).