Hi,
I am having a problem with attachRequestCompleted. Now my code looks something like this:
someUrl = "xxxx";
oModel = new sap.ui.model.odata.ODataModel(someUrl);
oModel.attachRequestCompleted(
function(){
alert("got here!");
});
oVendorModel.attachRequestFailed(
function (oControlEvent) {
// Do some error processing
alert("error!");
});
oSomeTable.setModel(oModel);
oSomeTable.bindRows("/VendorMinCollection", null, [
new sap.ui.model.Filter("SORTL", sap.ui.model.FilterOperator.EQ, searchTerm)]);
If the http response has some data, the function attached to the oModel object via the attachRequestCompleted executes just fine. If there is indeed an error then the function attached to handle request failure also executes just fine. The problem occurs when the request is executed, there is no error but there is no resultset as part of the response i.e. when the request fetches 0 results. Neither one of these functions is triggered.
Now from the way you have named these API I am assuming that this should not happen i.e. the request should either complete or be in error. Is there some other event that is being fired? Is this a bug?
Thanks for taking a look at this.