cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh Master view list from Create view

Former Member
0 Kudos

I have a Create View to create an order


oModel.create('/ZPCDEHDSet', requestBody, {

success: function(oData, oResponse) {

sap.m.MessageToast.show("Order Saved Successfully");

oModel.refresh(true);

//that.getEventBus().publish("Create", "Changed", { sEntityPath : "" });

  },

error: function(oError) {

sap.m.MessageToast.show("Problem happened while saving the order");

  }

}

);

I am not able to refresh the master view after creating the new order successfully.

I am using sapui5 v 1.38

previously I was using getEventBus to call the refresh in the Master view in v. 1.28 but with the new version it is not defined

Note: I used the Master Details template in sapwebide

I need your help please

Accepted Solutions (1)

Accepted Solutions (1)

former_member227918
Active Contributor

Hi Tareq,

model should refresh in your code, not sure why its not working, but you try below work around:

1: you can get master list and refresh individual in 1.38

var _oComponent = this.getOwnerComponent();

var oList = _oComponent.oListSelector._oList;

var oListBinding = oList.getBinding("items");

and inside success function :

oListBinding.refresh(true);


Regards,

Akhilesh

Former Member
0 Kudos

Thank you very much. you make my day

Answers (0)