08-24-2010 11:28 AM
My Widget has 3 pages, which navigate in this order:
page1 -> page2 -> page3
On load of page1, I make a web service call to retreive a json object, which I store into a file on the device.
Then page2 and page3 read the file to display their data.
There is 2 different way of accessing page1:
1) Widget startup
2) Press back in page2
For 1), I want to retreive the json from the web service
For 2), I want to retreive the json from the file (no web service call)
How can I detect if the page1 loads from 1) or 2) ?
Solved! Go to Solution.
08-24-2010 01:03 PM
I found a solution.
Using the blackberry.system.event.onHardwareKey event, I can trap the back key in page2, set the location.href to page1 + a querystring value indicating I'm comming back from page2.