cancel
Showing results for 
Search instead for 
Did you mean: 

Data Binding Issue using XML view

former_member269453
Participant
0 Kudos

Hi...

I am facing a certain issue. Please have a looh.

requirement: data needs to be populated in a List suing a XML view

What Done : i have created App View and the model has been set in init function of the app controller.

                    onInit : function() {

               sap.ui.getCore().setModel(

                 new sap.ui.model.json.JSONModel("model/app.json"));

                        

                  i have created a xml view 

          <List headerText="Product Overview"

            items="{ 

                path: '{/SalesOrderCollection}' 

                           }">

            <StandardListItem title="{SoId}"

            type="Navigation" press="handleProductListItemPress" />

            </List>

Output : But in the List No data comes....

Regards

Dipankar

View Entire Topic
Former Member
0 Kudos

var oModel = new sap.ui.model.json.JSONModel("model/app.json")

this.getView().setModel(oModel);

And the path should be

path: '/SalesOrderCollection'

former_member269453
Participant
0 Kudos

Thanks indrajit.. but still the data is not coming..

Changes Made :

onInit: function() {

  var oModel = new sap.ui.model.json.JSONModel("model/app.json");

  this.getView().byId("idList").setModel(oModel);

  },

Former Member
0 Kudos

var oModel = new sap.ui.model.json.JSONModel("model/app.json")

this.getView().setModel(oModel);

And the path should be

path: '/SalesOrderCollection'