on 05-09-2016 5:02 AM
hi
In my app i want to refresh my list after selecting approve . for that i tried this line but it is not working plz givea ny ideas
sap.ui.getCore().byId("app").getModel("loginPage").reload(true);
but it is not working.
Thank u
Nandini
HI
you need to provide more information. It is almost impossible to help you here.
thanks
-D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Dennis
My Component.js
createContent : function () {
var oView = sap.ui.view({
id : "app",
viewName : "olamapp.route",
type : "XML",
});
var oModel=new sap.ui.model.json.JSONModel();
oModel.loadData("xxxxxxxxx ,null ,false ,"GET" ,false ,false ,tapheader);
oView.setModel(oModel,"loginPage");
approve controller.js
OData.request
({
requestUri:"xxxxxxxxxx",
method: "GET",
headers:
{
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/atom+xml",
"DataServiceVersion": "2.0",
"X-CSRF-Token":"Fetch"
}
},
function(data, response) {
console.log(data.results[0].Purchaseorder);
console.log( window.JSON.stringify(data));
var oRouter = sap.ui.core.UIComponent.getRouterFor(that);
oRouter.navTo('purchase');
sap.m.MessageToast.show("Purchase order is Approved");
//window.location.reload(true);
var dialog = new sap.m.BusyDialog({
class:"sapUiBusy",
text:'Loading Data...'
});
dialog.open();
jQuery.sap.delayedCall(0,this, function () {
dialog.close();
});
},
function (err)
{
var request = err.request; // the request that was sent.
var response = err.response; // the response that was received.
alert("Error :"+ window.JSON.stringify(err.response));
sap.ui.core.BusyIndicator.hide();
}
);
},
this is my press function code
here i used window.location.reload(true); it is working fine but i want to refresh only list not complete app.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.