Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Issue with binding


I am facing some issue with UI binding on my view.

I have an sap.m.Table control in my xml view which I am trying to populate with some sample data in the onInit method of the controller.

But the table is rendered empty.. Could you please suggest what I am missing!!

This is my onInit method:

onInit: function(){
var mappingCollection = [];
var singleMapping = { "targetField": "Sample Target Field", "sourceField": "Some Source Field"}
var oMappingModel = new JSON();
sap.ui.getCore().setModel(oMappingModel, "mappingModel");


This is my XML view Table control:

<Panel class="sapUiResponsiveMargin" width="auto">

  <Table id="mappingTable"




  <Label text="Mapping"/>




  <Column width="12em">

  <Text text="Target Field" />


  <Column width="12em">

  <Text text="Source Field" />






  <Text text="{mappingModel>targetField}" valueLiveUpdate="true"></Text>

  <Text value="{mappingModel>sourceField}" valueLiveUpdate="true"></Text>






Not what you were looking for? View more on this topic or Ask a question