Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Load Local Storage Variable Before Chart

Hi,

I have a list of names, and when one is clicked the name is stored to a local storage variable and the app navigates to another screen.

This screen is populated by a chart, which uses JS in service success event to populate a chart.

The problem is that the chart is always populated with the previous Local Storage Variable rather than the one just clicked.

How can I make sure that the chart loads after the service uses the new local storage variable, rather than the previous one?

thanks

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Load Local Storage Variable Before Chart

Hello Paul,

You should check the sequence of operation of actions. You can change their order by clicking on the arrow in the list of events

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Load Local Storage Variable Before Chart

Hi Evgene,

here is my sequence with 4 invoking the service and 9 running the JS for the Jqplot...so not sure that is the problem?

Image

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

Load Local Storage Variable Before Chart

Hello!

If it is necessary for you to execute one service after another, it is better to execute the second service on event "complete" of the first service. This will ensure the exact order of sending queries

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Load Local Storage Variable Before Chart

Thanks Arina

Return to “Issues”