I am trying to bind data from controller to view but for some reason I am unable to display data in the view. I am setting the model using the following code:
var oModel = new sap.ui.model.json.JSONModel();
oModel.setData(oObject);
this.getView().setModel(oModel);
console.log("DATA:-->"+ JSON.stringify(this.getView().getModel().getData()));
The console statement prints the data properly but in the view the data is not appearing. Am I missing something. I am unable to find the problem.
My View:
.....
<form:SimpleForm
id="iform"
minWidth="1024"
maxContainerCols="2" >
<Label text="Name"/>
<Text text="{NAME}"/>
<Label text="Age"/>
<Text text="{AGE}"/>
</form:SimpleForm>
.....
Thanks in advance.
<Text text="{/0/NAME}" />etc - Qualiture