int realmID = sessionInfo.getRealm().getRealmID();
int navigationContext = sessionInfo.getNavigationContext();
String defaultView = navigationContext ==
SessionInfo.MANAGEMENT_CONSOLE_CONTEXT
? Property.getProperty(new SystemConfigKey("ui.defaultManagementConsoleViewType"))
: Property.getProperty(new ProfilePropertyKey("ui.defaultUserConsoleViewType", sessionInfo));
if(navigationContext == SessionInfo.USER_CONSOLE_CONTEXT) {
selectedView = CoreUtil.getCookieValue("ui_view_" + getModel().getId() + "_" + navigationContext, request, defaultView);
if (selectedView == null){
selectedView = Property.getProperty(new ProfilePropertyKey(CoreUtil.getCurrentPropertyProfileId(request.getSession()),
sessionInfo.getUser().getPrincipalName(),
"ui.defaultUserConsoleViewType", realmID));
CoreUtil.storeUIState("ui_view_" + getModel().getId() + "_" + navigationContext, defaultView, request, response);
}