on 02-21-2014 6:55 PM
hi
What are the object passed in the model's callback functions e.g. attachRequestCompleted / attachRequestFailed...I am trying to get the response code/status, the data etc on a model call
Does it send the status & the XHR object ?
var dataModel = new sap.ui.model.json.JSONModel();
dataModel.attachRequestCompleted(function(data,textStatus,jqXHR){
});
dataModel.attachRequestFailed(function(object){
<<<>>>>
})
Thanks
Sandip
Hi Sandip,
May be are the same as jQuery Ajax Call:
jQuery.ajax() | jQuery API Documentation
.done()
method replaces the deprecated jqXHR.success()
method. Refer to deferred.done()
for implementation details..fail()
method replaces the deprecated .error()
method. Refer to deferred.fail()
for implementation details..always()
method replaces the deprecated .complete()
method.Kind regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Angel
I tried the same too, looks like apart from data, nothing is available and the data contains the entire response string, including the code/actual data object and everything
The other two, textStaus/jqXHR comes undefined.. I wasnt sure if I was doing it right
try
alert(JSON.stringify(data));
Thanks
Sandip
User | Count |
---|---|
74 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.