Michael.
Please look at this tutorial:http://blog.bismallion.com/map-appery...
It should provide you the following information:
1) what value LSV should have
2) how to map LSV with selectmenu
Michael.
Please look at this tutorial:http://blog.bismallion.com/map-appery...
It should provide you the following information:
1) what value LSV should have
2) how to map LSV with selectmenu
Hi,
I had read everything that I can find on this issue and I have tried alsorts of variations, but im still getting problems
im doing something wrong.
Here are the screenshots for
collection,
model,
localstorage set up,
sucess mapping to LSV on login
result in localstorage after mapping
mapping to page from LSV
error in console on page
if theres anything else you need to see please ask
Im running out of time with this upgrade, my app will be deleted from app store
maybe a quicker solution to this would be an example of whats needed to implement this?
none of the examples or docs I have seen have a collection like mine being mapped to components in a grid.
sucess mapping to LSV on login
result in localstorage after mapping
mapping to page from LSV
Michael,
Your problem is in data that you are providing to map on the page
http://gyazo.com/80233bc3e6d48f2f8605...
Your angloveipizza in the DB collection has sizeandprice column, that has an array of the strings, but you use it in the mapping as array of objects with the fields size and price.
The solution is to parse your string as an object before mapping.
Hi Evegene,
unsure exactly what you mean here,
do you mean change the model?
Do you have a screenshot of what you changed to get you result?
Hi Michael -
I think that Evgene trying to say that you have 2 options:
First the hard one:
a) create separate collection for sizeandprice
b) add pointer column to anglovegpizza
c) use id of sizeandprice collection
d) update your list request for pizza - add parameter include sizeandprice
Second the easy one:
a) Save your response to localstorage variable
b) parse your string "{size=10 inch}, {price=5.00} " into valid json object for each entity in array to:
pre
code
anglovegpizzalist {
anglovegpizzalist{
...............
sizeandprice:{
{size: "10 inch"},
{price: 5.00}
}
}
}/code/pre
Hi Evegene,
im still not getting any further with this, can I get a screenshot of the setup you used to get this result
http://gyazo.com/80233bc3e6d48f2f8605...
it would be greatly appreciated
thanks
Michael,
[quote:]I get a screenshot of the setup you used to get this result[/quote]
We opened the console on test, then just followed your steps:
1) once logged in to the app (use "a" as login and pass)
2) click new order btn
3) from menu click pizza
4)then click vegetarian pizza
We have noticed which LSV you map, so we output it to console. that it is all
OK, How do I resolve the problem, can you help or not?
"The solution is to parse your string as an object before mapping"
do you have the code to prase as an object, I have tried this but no good
.
codevar arr;
try {
arr = JSON.parse(value);
if ({}.toString.call(arr) !== "[object Array]") {
arr = [];
}
} catch ( e ) {
arr = [];
}
return {"array": arr};/code
Hello Michael,
For your service anglovegpizza on load event add js code to chickcnpizzaselectmenu-0 value param :
return JSON.parse(value).price;
and for Label param
return JSON.parse(value).size;