GregJohnson
Posts: 0
Joined: Sun Feb 05, 2012 9:39 pm

Expantion of Data Mapping

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Expantion of Data Mapping

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?

GregJohnson
Posts: 0
Joined: Sun Feb 05, 2012 9:39 pm

Expantion of Data Mapping

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Expantion of Data Mapping

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

Return to “Issues”