08-05-2013 05:49 AM - edited 08-05-2013 05:50 AM
Sorry if this question have been asked before but I haven't found any relevant information.
Here is my issue. I have a WebWorks app built with BBUI.js. On the first screen there is search functionality, after the search is performed, list of items is presented to the user. Once the user clicks on a item, new screens open with additional information. IMO pretty straightforward approach. However when I press the Back button, the screen below (first screen) is in its initial state - no search results, even no search word in the search field.
Is it how WebWorks/BBUI is supposed to work or am I doing something wrong? How can I "persist" the screen state, so when users clicks the Back button he/she can see the results of the search?
Solved! Go to Solution.
08-06-2013 09:06 AM
I don't think you're doing anything wrong here, this is the way bbUI.js was built. It does not currently cache/persist/etc screen states when you switch between tabs.
The best way I can think of off the top of my head would be for you to manually cache the current view (localStorage is always fast and easy to use), then display that cached view when the user click on the tab again.
08-07-2013 10:42 AM
I had a similar problem with my maps app and found a solution to it. I simply create a DOM object for the screen and store the Google Maps object in a variable and when the screen is reloaded, I check if a map already exists in which case I don't create a new one but append the existing map to the DOM instead:
Please follow the link below for details on the discussion and solution.