Page 2 of 2

I am unable to save values from select components into localstorage and vice versa

Posted: Sun Mar 08, 2015 10:45 am
by Alena Prykhodko

Hello,

You can find how to work with component here http://devcenter.appery.io/documentat...
Code below allows to set and get localStorage variables value:
prelocalStorage.getItem('name');
localStorage.setItem('name', 'value');/pre


I am unable to save values from select components into localstorage and vice versa

Posted: Sun Mar 08, 2015 10:48 am
by Abhijeet Singh

Suppose I have an array of 10 name stored in lsv, how do i get these values to show it in the select component using javascript?


I am unable to save values from select components into localstorage and vice versa

Posted: Thu Mar 12, 2015 3:17 am
by Yurii Orishchuk

Hi Abhijeet,

At first you should set your LSV as storage.

  1. Open "Storage and models".

  2. Add new model with type "Array". http://prntscr.com/4uey7v/direct

  3. Add storage with type model from 2nd step. http://prntscr.com/4ueyq8/direct

    Then you can add any event handler with action Mapping. And link this storage to your select component(populate select with data from this storage).

    Regards.