I am trying to implement the row select event on a table using SAPUI5 and I write the below code:
var oModel = new sap.ui.model.odata.ODataModel( "../path.xsodata",true);
sap.ui.getCore().setModel(oModel);
oTable.bindRows({path:"/path", formatter:function(fValue) {
jQuery.sap.require("sap.ui.core.format.DateFormat");
var oDateFormat = sap.ui.core.format.DateFormat.getDateTimeInstance({pattern: "dd.MM.yy"});
return oDateFormat.format(new Date(fValue));
} }).placeAt("table");
oTable.attachRowSelect(function(oEvent){
var currentRowContext = oEvent.getParameter("rowContext");
var first_value= oSystemDetailsML.getProperty("firstvalue", currentRowContext);
//var second_value= oSystemDetailsML.getProperty("secondvalue", currentRowContext);
});
When I execute the code I get an error in the browser "Uncaught TypeError: Object [object Object] has no method 'attachRowSelect'"
. Any ideas where the problem is. For me it should work fine after referring ´http://scn.sap.com/thread/3452412´ and ´http://scn.sap.com/community/developer-center/front-end/blog/2012/06/01/sample-application-using-ui5-and-gateway´.
Thanks