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.