Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

TextField binding with Odata model

$
0
0

Hi All,

 

I need your help here. I followed thread  Simple OData Binding with SAPUI5in order to bind my control Text field with Odata model but  am still not able to get data in my TEXT FIELD from my Odata model 

 

Surprisingly I am getting model data in UI if i use Table but not getting when I try to show in TextField inside a matrix layout.

 

/***** myView.js***********************/

var oModel = new sap.ui.model.odata.ODataModel("/SIVA/services/CusustomerData.xsodata/", true);

sap.ui.getCore().setModel(oModel);

 

  var oCell = new sap.ui.commons.layout.MatrixLayoutCell();

 

  var oTextField  =  new sap.ui.commons.TextField("tko_plan",{value: "{FirstName}"});    //FirstName is column name

  oTextField.bindElement("/Customer"); // Customer is name of the Odata entity

  oTextField.placeAt("content");

 

  oCell.addContent(oTextField);

  oCell.setModel(oModel);

  oRow.addCell(oCell);

  oLayout.addRow(oRow);

 

  oLayout.addRow(oRow);

        return oLayout;

 

Any help would be appreciated!

 

Thanks

Siva


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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