Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3280

Uncaught SyntaxError: Unexpected token

$
0
0

Hii ,

I am trying to bind my table with odata service in index.html. I am using the following code:

 

 

  var tableo = new sap.ui.table.Table({

  title : "Indian Cricket Team",

  visibleRowCount : 5,

  selectionMode : sap.ui.table.SelectionMode.Single

  });

 

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Sr No."}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Srno"),

  width: "200px"

  }));

 

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Player"}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Player"),

  width: "200px"

  }));

 

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Age"}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Age"),

  width: "200px"

  }));

 

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Country"}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Country"),

  width: "200px"

  }));

 

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Email"}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Email"),

  width: "200px"

  }));

 

  var odatao = new sap.ui.model.odata.ODataModel({

  '/sap/opu/odata/sap/ZODATA_TEAM_SRV',

  false,

  "userid",

  "password"

  });

  tableo.setModel(odatao);

  tableo.bindRows("/zteam_enity_typeSet");

  tableo.placeAt("content");

 

But when i rumn this in chrome Browser It is showing the Uncaught SyntaxError: Unexpected token . And odata service is working properly in gateway client.

Please Help.


Viewing all articles
Browse latest Browse all 3280

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>