Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/381.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript can';t获取Oracle Jet ojetable中选定行的值_Javascript_Oracle Jet - Fatal编程技术网

Javascript can';t获取Oracle Jet ojetable中选定行的值

Javascript can';t获取Oracle Jet ojetable中选定行的值,javascript,oracle-jet,Javascript,Oracle Jet,我有一张oracle jet表,就是这样的 <table data-bind="event: {ojbeforecurrentrow: currentRowListener}, selectionMode: {row: 'single'}, ojComponent: {component: 'ojTable', data: dataSource, columns: [ {headerText: 'Stude

我有一张oracle jet表,就是这样的

 <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> 
self.currentRowListener = function (event,ui) {
      var current = ui.currentRow;
          alert(current);
           };
警报值未定义,因此无法获取所选行的值

在输入文本中设置它

问题出在哪里

您可以检查以下内容:

self.currentRowListener = function (event) {
     {
            var data = event.detail;
            var newCurrentRow = data.currentRow;
            alert(newCurrentRow );
            var oldCurrentRow = data.previousCurrentRow;

    }
供selectionListener参考 您可以检查以下内容:

self.currentRowListener = function (event) {
     {
            var data = event.detail;
            var newCurrentRow = data.currentRow;
            alert(newCurrentRow );
            var oldCurrentRow = data.previousCurrentRow;

    }
供selectionListener参考