Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Odata model sends request many times

$
0
0

Hi,

 

I have a odata model. Whenever the function is called, the request gets sent twice. Here is my code

 

     populateTable:function(SalesOrg, FiscalYear, FiscalPeriod, CustomerHierarchy1, ProductLine, searchFilter){

        var oRowTemplate = new sap.m.ColumnListItem({

        cells : [

            new sap.m.Text({text : "{CustomerHierarchy1}" }),

            new sap.m.Text({text : "{ProductFamily}"})

            ]}

        ); 

        var oTable =this.getView().byId("populateTable");

        oTable.bindItems({

                path: URL.populateTable.entity,

                template:oRowTemplate

        });

        var oModel = new sap.ui.model.odata.ODataModel(URL.populateTable.service, true);

        alert(oModel);

        oTable.setModel(oModel);

  }

 

 

The alert is popped up only once. However, the request is twice. Everything including the URL parameters and response are same.


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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