Table.getCurrentRow

Returns the row number for the table's current row.

The current row represents an important concept - a current row exists for all tables that are not empty. All references to table columns and their values which do not explicitly specify a row number are interpreted as referring to the corresponding table cell for the column on the current row. For example, in the following line of code, values for the ORDER_VAT and ORDER_VALUE columns are obtained from the current row.

 orders.ORDER_VAT.value = orders.ORDER_VALUE.value * vatRate;
 
The current row is set by the system as follows:
  • when a table cell event is executed e.g. user clicks a button or hyperlink, the current row is set to the row containing that table cell
  • while traversing table rows using a TableRowIterator, the current row is set each time the next() or previous() method is invoked. When all rows have been processed by the TableRowIterator, the current row is returned to its original value. If all rows are not processed by the TableRowIterator, the current row remains set to the row at the break point.
  • the #insertRow() method, or the user clicking the add row button, both set the current row to the new row
  • the #fetchTable() method sets the first row as the current row
  • a sort operation, either invoked by the user or using one of the #sort(TableColumn) methods, sets the first row as the current row
  • the #updateTable() may reset the current row depending on circumstances
  • a vertical scroll operation by the user sets the current row to the first visible row of the new display

returns int