W
whenshaw
Guest
You would need to use the Window.sessionStorage API, since the saveLocal and readLocal methods are properties of the JSDO, not the JSDOSession (which is where the userName is). sessionStorage.setItem("namekey", jsdoSession,userName); sessionStorage.getItem("namekey"); Keep in mind that doing this exposes the user name more than it normally is, but at least using sessionStorage will get it cleaned up automatically for you when the browser tab is closed. On the second question: If you know that you want to clear out the catalog data in the ServicesManager every time you log out, it might be worth changing progress.all, but then of course you'd need to remember to put the change back in if you update progress.all.js. Another drawback is that if you plan to use the minified version of progress.all.js for deployment, you'd need to minify your modified progress.all.js and use that. As for placement, the onAfterLogout() function would be a good place. An alternative to changing progress.all.js is to continue to include those statements in your code, in the handler for the promise returned from JSDOSession.logout(). (Unless that's what you're trying to avoid doing.) (And, of course, if you modify the JSDO library and something goes wrong, remember to switch back to the official release version to eliminate your change as a possible cause of the problem before contacting technical support.)
Continue reading...
Continue reading...