i have an oracle jet table which is like that
<table data-bind="event: {ojbeforecurrentrow: currentRowListener},
selectionMode: {row: 'single'},
ojComponent: {component: 'ojTable',
data: dataSource,
columns: [
{headerText: 'Student Id', field: 'Id'},
{headerText: 'FirstName', field: 'FirstName'},
{headerText: 'LastName', field: 'LastName'},
{headerText: 'BirthDate', field: 'BirthDate'},
{headerText: 'Gender', field: 'Gender'}
]
}">
</table>
and the js file looks like that
self.currentRowListener = function (event,ui) {
var current = ui.currentRow;
alert(current);
};
the alert value is Undefined , so i can't get the value of selected row
to set it in input text
what seems to be the problem
You can check this:
self.currentRowListener = function (event) {
{
var data = event.detail;
var newCurrentRow = data.currentRow;
alert(newCurrentRow );
var oldCurrentRow = data.previousCurrentRow;
}
For reference for selectionListener Oracle Jet Table Events