Persist page state

Hi I would like to persist the page state, it is very irritating when the client decides to reload or your on mobile and you scroll up and the entire thing reloads. I’m using deeplinks to manage this and some javascript in conjunction with window.history and some mx.ui.contentform extension to handle it   There are two issues: non presistable retrieval and page state. How can I get at an np if theres no association to traverse to it and what are the possibilities for saving and restoring the state of widgets on the page (e.g. template grid offset etc.)? Thanks
2 answers


What if you messed around with the window on before unload event and then use the client api to reload the page. There is a function called 


it was mentioned in this question:


Then you can use the html snippet to add something like this to the page (haven’t tested this):

 window.onbeforeunload = function(event)


Try to catch the reload event and trigger your own reload. 


Hope this helps!


You might consider associating an np helper entity to the session entity, storing the desired values on the helper, and then retrieve the helper as needed via the session.