cancel
Showing results for 
Search instead for 
Did you mean: 

Detail page not loading with Data

Former Member
0 Kudos

Hello Experts,

I am new to SAP UI5 development.and  facing issue in  SAP WEBIDE app development.

On clicking of  entry in master page details page is not loading with required data.

"This Order Not available" page is coming.

Using ODATA model service to create structure .

_onBindingChange : function () {

  var oView = this.getView(),

  oElementBinding = oView.getElementBinding();

  // No data for the binding

  if (!oElementBinding.getBoundContext()) {

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

  // if object could not be found, the selection in the master list

  // does not make sense anymore.

  this.getOwnerComponent().oListSelector.clearMasterListSelection();

  return;

  }

in above mention code:

oElementBinding.getBoundContext()  is throwing null..

why its throwing null.


please help.


Regards,

Hari.

Accepted Solutions (1)

Accepted Solutions (1)

rpanneel
Participant
0 Kudos

Did you bind your view in the onRouteMatched?


onRouteMatched: function(oEvent) {

     var oParams = oEvent.getParameters(),

           sPath = "/yourEntitySet("'"+oParams.arguments.yourProperty+"'");

     this.getView().bindElement({

          path: sPath,

          events: {

               change: this._onBindingChange.bind(this)

          }

     });

}

Regards,

Robin

Former Member
0 Kudos

Hi Robin,

Many thanks for your response.

Yes.I am binding view onRouteMatched as follows.

              

this.getModel().metadataLoaded().then( function() {

  var sObjectPath = this.getModel().createKey("Orders", {OrderID :  sObjectId});

  this._bindView("/" + sObjectPath);

  }.bind(this));

As I mentioned in my query onBindChangeMethod

oElementBinding.getBoundContext() throwing null.

how to check which backend data it is checking  and throwing msg as not found.

Order List is generating Master page from backend source(server:port:XMII/IlluminatorOData/Rowset(QueryTemplate=path/RowsetID=1)/Row) same order number is not coming in Details page.

how to check which backend data it is cheking and throwing msg as not found.

Appreciate your help.

Regards,
Hari

rpanneel
Participant
0 Kudos

Hi Hari,

Why are you creating a key on your Collection in the model? Isn't your masterList not containing every information you need?

If it's the case you just need to create your bindingPath for your detail route and bind that to the view in order to be able to see details.

Regards,

Robin

Former Member
0 Kudos

Thanku So much Robin.You made my day.

After removing createKey ,detailed page loaded.

Can you please explain what createkey is doing exactly.

I assumed as the propertyname as key will act as link for other properties in detail page.

Thanks,

Hari

Answers (0)