cancel
Showing results for 
Search instead for 
Did you mean: 

Routing & Data binding: Fake XHR onreadystatechange handler threw exception

alpi
Explorer
0 Kudos

I want to navigate from Master to Detail with a parameter called (ItemID).

But there's an error in console and there are no details in Detail view.

Uncaught TypeError:

Fake XHR onreadystatechange handler threw exception: Cannot read property 'indexOf' of undefined


onInit: function () {

  var oRouter = this.getRouter();

  oRouter.getRoute("AuctionList").attachMatched(this._onRouteMatched, this);

  },

  _onRouteMatched : function (oEvent) {

  var oArgs, oView;

  oArgs = oEvent.getParameter("arguments");

  oView = this.getView();

  oView.bindElement({

  path : "/Detail/" + oArgs.ItemID,

  model: "myData",

  events : {

  change: this._onBindingChange.bind(this),

  dataRequested: function (oEvent) {

  oView.setBusy(true);

  },

  dataReceived: function (oEvent) {

  oView.setBusy(false);

  }

  }

  });

  },

  _onBindingChange : function (oEvent) {

  // No data for the binding

  if (!this.getView().getBindingContext()) {

  this.getRouter().getTargets().display("notFound");

  }

  }

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

any solution Alex?? am also facing same issue.