w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

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

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.

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

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

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

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

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.

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

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

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);
w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

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

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

Kirit Vaghela
Posts: 0
Joined: Tue Aug 27, 2013 11:23 am

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

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

Kirit Vaghela
Posts: 0
Joined: Tue Aug 27, 2013 11:23 am

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

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 

});

Return to “Issues”