Tag Archives: displayrow

Scroll to specific row in a table on pageload


Following code will help you to scroll to a specific row in a af:table on page load.

//Code to scroll to a specific row
this.tableBinding.setRowIndex(rowIndex);
RowKeySet ps = this.tableBinding.getSelectedRowKeys();
ps.clear();
ps.add(this.tableBinding.getRowKey());
AdfFacesContext.getCurrentInstance().addPartialTarget(this.tableBinding);

Also set the displayRow=selected for the table

Advertisements