Page 2 of 3

Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Thu Mar 28, 2013 12:55 pm
by w

Yes, I can confirm this, just tested.


Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Thu Mar 28, 2013 1:09 pm
by w

Exactly the same also happens if i use a local variable instead of a javascript variable.
Not only is the javascript that is used when making a mapping with the local of javascript variable still there, but the page becomes blank. Actually, it shows the page for a split second, and then turns blank.


Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Thu Mar 28, 2013 1:14 pm
by Maryna Brodina

Ok, than you.


Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Thu Mar 28, 2013 1:27 pm
by w

Being a newbie, what's the timeframe for resolving a bug like this? Hours, days, weeks, months?


Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Thu Mar 28, 2013 1:31 pm
by Maryna Brodina

Most likely weeks in this current case. We are going to release new version in the middle of April. For now we can try to find some workaround.


Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Thu Mar 28, 2013 2:06 pm
by w

The fact that the page becomes blank also happens, even if you don't delete the javascript variable.

So:

  • mapping from responseparameter to javascript variable. "edit js" . Put anything you want, even just comment or 1 space.

    Save and test: page goes blank.

    /*************************

    • NONVISUAL COMPONENTS *
      ************************/
      var datasources = [];
      contacts2 = new Tiggr.DataSource(ContactsService, {
      'onComplete': function(jqXHR, textStatus) {
      $t.refreshScreenFormElements("j_30");
      },
      'onSuccess': function(data) {},
      'onError': function(jqXHR, textStatus, errorThrown) {},
      'responseMapping': [{
      'PATH': ['$'],
      'ID': 'js',
      'TRANSFORMATION': function(value, element) {},
      'SET': []
      }],
      'requestMapping': [{
      'PATH': ['options', 'filter'],
      'ID': 'local_storage',
      'ATTR': 'Naam'
      }, {
      'PATH': ['options', 'multiple'],
      'ATTR': 'true'
      }, {
      'PATH': ['params', 'fields'],
      'ATTR': ''
      }]
      });
      datasources.push(contacts2);

    In fact, he page DOES show when the javascript variable exist in the Tiggzi designer, but you leave the JS empty. Then the source code looks like this:

    /*************************

    • NONVISUAL COMPONENTS *
      ************************/
      var datasources = [];
      contacts2 = new Tiggr.DataSource(ContactsService, {
      'onComplete': function(jqXHR, textStatus) {
      $t.refreshScreenFormElements("j_30");
      },
      'onSuccess': function(data) {},
      'onError': function(jqXHR, textStatus, errorThrown) {},
      'responseMapping': [],
      'requestMapping': [{
      'PATH': ['options', 'filter'],
      'ID': 'local_storage',
      'ATTR': 'Naam'
      }, {
      'PATH': ['options', 'multiple'],
      'ATTR': 'true'
      }, {
      'PATH': ['params', 'fields'],
      'ATTR': ''
      }]
      });
      datasources.push(contacts2);

Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Thu Mar 28, 2013 2:15 pm
by Maryna Brodina

Sorry, what is your app name?


Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Thu Mar 28, 2013 2:19 pm
by w

I deleted the page already from the shared app. App name is "test"


Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Tue Oct 08, 2013 9:43 am
by Kirit Vaghela

Hello, I add new service in js. Now I get error with service is not defined
code
/*
* Nonvisual components
*/
var datasources = [];
get_email_no_clone = new Appery.DataSource(get_email_phone_no_service, {
'onComplete': function(jqXHR, textStatus) {
var phoneNo = localStorage.getItem('phone_no');
document.location.href = 'tel:' + phoneNo;

Code: Select all

         $t.refreshScreenFormElements("dashboard_clone_1"); 
     }, 
     'onSuccess': function(data) {}, 
     'onError': function(jqXHR, textStatus, errorThrown) {}, 
     'responseMapping': [{ 
         'PATH': ['$[0]', 'email'], 
         'ID': '___local_storage___', 
         'ATTR': 'emial' 
     }, { 
         'PATH': ['$[0]', 'phone_no'], 
         'ID': '___local_storage___', 
         'ATTR': 'phone_no' 
     }], 
     'requestMapping': [{ 
         'PATH': ['X-Appery-Database-Id'], 
         'HEADER': true, 
         'ATTR': '{database_id}' 
     }, { 
         'PATH': ['X-Appery-Session-Token'], 
         'HEADER': true, 
         'ID': '___local_storage___', 
         'ATTR': 'token' 
     }] 
 }); 

 datasources.push(get_email_no_clone); 

/code


Bug: Deleting a js variable after having it connected to a service response parameter, actually doesn't delete it!

Posted: Tue Oct 08, 2013 9:59 am
by Kirit Vaghela

find the issue
I have to add this service into files/views/js/services/service.js file also

var get_email_phone_no_service = new Appery.RestService({
'url': '{database_url}/collections/phone_email_info',
'dataType': 'json',
'type': 'get',

Code: Select all

 'serviceSettings': sig_settings 

});