Yan Yi
Posts: 0
Joined: Sat Jan 25, 2014 7:38 pm

onSuccess/Error/complete Appery service API

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

Return to “Issues”