[progress Communities] [progress Openedge Abl] Forum Post: Re: Jsdo Refresh

  • Thread starter Thread starter whenshaw
  • Start date Start date
Status
Not open for further replies.
W

whenshaw

Guest
Hello Martyn, There is no complete, direct support in the JSDO library for making it easy to handle page refreshes, but adding that support is a priority for the team (though which specific features actually will make it into the next release is still being worked out). One possibility for now, however: Instead of trying to store the current session and re-invoke it, have you tried this: After a page refresh, create a new JSDOSession and then call its login() method, passing it no credentials. With Form authentication, the browser itself should still have the sessionid even after the refresh and pass it even on the login(). If the login succeeds, you will need to call addCatalog() again, because the catalog data was also destroyed by the page refresh. If the login() and addCatalog() succeed, there are two possibilities for the JSDO data. One is to simply fetch it again the same way you did when the app started. If you need to retain the data that the JSDO had before the page refresh, look into the JSDO's local storage API -- saveLocal(), readLocal(), addLocalRecords(), and deleteLocal(). These methods are in the documentation and there is a short example here: community.progress.com/.../53433 --Wayne

Continue reading...
 
Status
Not open for further replies.
Back
Top