Page 1 of 1

Expantion of Data Mapping

Posted: Tue Feb 21, 2012 3:04 pm
by GregJohnson

Would also be nice to map objects on the screen like text fields with localStorage variables and it automaticly setup so when the field changes, so does the localStorage variable and vice versa. Also it seems that not all localStorage variables show up for every page.


Expantion of Data Mapping

Posted: Wed Feb 22, 2012 12:23 am
by maxkatz

This sort of binding (bi-directional) is on our road map in the future. Here is what you can do today. Create a Local Storage variable and bind it to an input component. That's binding one way. When you change the value in the component, add this code on value change event:

code
localStorage.setItem('locName', Tiggr('input').val());
/code

You may also look at backbone.js - it provides this and other functionality.

[quote:]
Also it seems that not all localStorage variables show up for every page.
[/quote]
Can you explain/show when this happens?


Expantion of Data Mapping

Posted: Wed Feb 22, 2012 1:50 am
by GregJohnson

Just ran through it. I went to a page with a rest service that had the request mappings setup to use localStorage variables. I deleted the links to the localStorage variables, saved the project, exited the builder then re-entered. When I went back to the data mapping tab for that page, the localStorage variables did not show up. Though if I go to the configuration page that lets some of those be changed, they do show up there.


Expantion of Data Mapping

Posted: Wed Feb 22, 2012 1:54 am
by maxkatz

Can you attach a screen shot and show where it is not present and where it's present?