Page 1 of 1

onSuccess/Error/complete Appery service API

Posted: Tue Apr 15, 2014 11:51 pm
by Yan Yi

hello! May I know what is the javascript API to call the event onSuccess/onError/onComplete after calling a service using myService.execute({});?

Below is the generated JS by Appery. I tried using onSuccess: function(data) {alert('success');} but it didn't work. I suppose I'm missing out some parts of the code?

code
postInfoService = new Apperyio.DataSource(PostInfo, {
'onBeforeSend': function(jqXHR) {

Code: Select all

     }, 
     'onComplete': function(jqXHR, textStatus) { 

         Apperyio.refreshScreenFormElements("connectDevice"); 
     }, 
     'onSuccess': function(data) {}, 
     'onError': function(jqXHR, textStatus, errorThrown) {}, 
     'responseMapping': [], 
     'requestMapping': [{ 
         'PATH': ['hours'], 
         'TYPE': 'STRING', 
         'ID': '___local_storage___', 
         'ATTR': 'hours' 
     }, ] 
 });/code

onSuccess/Error/complete Appery service API

Posted: Wed Apr 16, 2014 12:19 am
by Alena Prykhodko