For some reason I have been all about the hacks lately...
So I needed a quick way to implement user-based workspace saving and I came up with the following poor man's approach:
Assuming
getWorkbenchConfigurer().setSaveAndRestore(true);
is performed in the ApplicationWorkbenchAdvisor, then workspace save is based on session id. Which works great when you refresh the browser or keep the same cookie between browser usages.
But if I want the workspace settings to be usable between various browsers and computers then I can add this to my entrypoint before workbench start:
if (userId != null) {
ContextProvider.getSession().setAttribute( "settingStore",userid);
}
Then essentially the setting store for the user is keyed by the user's id, so wherever the user logs in, their workbench will be setup with their stored settings.
Does anyone have a more mainstream approach to share?
[Updated on: Wed, 16 June 2010 22:05]
Report message to a moderator