Problem Mapping Local Storage Variable Arrray to List

This forum contains topics that were moved from Get Satisfaction
Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Problem Mapping Local Storage Variable Arrray to List

Post by Deon »

Hi

I have created a generic service to map my Local storage variable array to a List.

This is my Jscript for the generic service.

Appery.getProgrammes = Appery.createClass(null, {

Code: Select all

 init : function(requestOptions) { 
     this.__requestOptions = $.extend({}, requestOptions); 
 }, 

 process : function(settings) { 
     settings.beforeSend(settings); 
     if (this.__requestOptions.echo) { 
         settings.success(this.__requestOptions.echo); 
     } else { 
         var cdata = Apperyio.storage.programmeList.get(); 
         settings.success(cdata); 
     } 
     settings.complete('success'); 
 } 

});

This is the error:
======================
VM34736:202 Error: Attempt to access Array by property name : 'resource'
at Object.get (mapping-impl.js:325)
at Object.
get (mapping-impl.js:343)
at Object.get (mapping-impl.js:310)
at Entry.window.entry.Entry.getValue (mapping-impl.js:82)
at MappingUnit.window.
mapping_unit.MappingUnit.processMappings (mapping-impl.js:196)
at MappingUnit.window.mapping_unit.MappingUnit.process (mapping-impl.js:127)
at Function.processMappingAction (mapping-impl.js:10)
at derived.onSuccess (eval at globalEval (jquery-2.1.1.js:330), :171:22)
at derived.
successHandler (appery.js:397)
at Object.proxy [as success] (jquery-2.1.1.js:513)
======================

The LSV does contain the correct info when I output it to the console.

This is my service response......

Image

This is my mapping

Image

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Problem Mapping Local Storage Variable Arrray to List

Post by Serhii Kulibaba »

Hello Deon

Unfortunately, any help (and/or debugging) with your custom app code or logic as well as 3rd party Apache Cordova/PhoneGap plugins are not covered by our [Support policy] (https://docs.appery.io/docs/general-s...).
To get such help, you will need to consider purchasing Advisory Pack: (https://appery.io/services/#Advisory_...)

What functionality do you need to have with that service? Just make a mapping from the Storage variable?

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Problem Mapping Local Storage Variable Arrray to List

Post by Deon »

Oh, then please explain why 99.9% of all the issues logged here are being helped as they are all based on custom app code and logic.

Then provide decent documentation in how to do stuff, such as how to create a generic service for local storage array to filter and map data to a page so that I dont have to deal with support.

I cant "just make a mapping" as mappings do not allow for filtering of data or if it does I cant find it in your so called "documentation".

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Problem Mapping Local Storage Variable Arrray to List

Post by Deon »

Well can you provide a link to documentation on how to create a service that allows me to map LSV array to a list based on a query.

Oleg Solodiuk
Posts: 34
Joined: Fri Jan 10, 2020 6:49 am

Problem Mapping Local Storage Variable Arrray to List

Post by Oleg Solodiuk »

Please see this documentation: https://docs.appery.io/docs/appbuilde...

Post Reply