//AGGIORNARE SE L'UTENTE CORRENTE è DIVERSO DA GUEST
//public static final String SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG = "jpmyportalplus_currentCustomUserPageConfig";
//AGGIORARE SEMPRE
//public static final String SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG = "jpmyportalplus_currentCustomPageConfig";
IPage currentPage = this.getCurrentPage();
UserDetails currentUser = super.getCurrentUser();
if (null == currentUser) {
currentUser = this.getUserManager().getGuestUser();
this.getRequest().getSession().setAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER, currentUser);
}
if (!currentUser.getUsername().equals(SystemConstants.GUEST_USER_NAME)) {
CustomPageConfig customUserPageConfig = null;
PageUserConfigBean pageUserConfigBean =
(PageUserConfigBean) this.getRequest().getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG);
if (null == pageUserConfigBean) {
ApsSystemUtils.getLogger().info("No Page User Config by user " + currentUser.getUsername());
pageUserConfigBean = this.createNewPageUserConfig(infos, currentUser, currentPage);
this.getRequest().getSession().setAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG, pageUserConfigBean);
customUserPageConfig = pageUserConfigBean.getConfig().get(currentPage.getCode());
} else {
customUserPageConfig = pageUserConfigBean.getConfig().get(currentPage.getCode());