int refreshPeriod = preferences.getPageRefreshPeriod();
if (UIConstants.DONT_REFRESH_PAGE != refreshPeriod) {
request.setAttribute("refreshPeriod", String.valueOf(refreshPeriod));
}
Portal portal = (Portal) session.getAttribute(Constants.USERS_SES_PORTAL);
if (portal == null) {
portal = new Portal();
portal.setName("dashboard.template.title");
portal.setColumns(2);
//construct from user preferences.
portal.addPortletsFromString(dashboardPreferences.leftColumnPortletNames, 1);
portal.addPortletsFromString(".dashContent.addContent.narrow", 1);
portal.addPortletsFromString(dashboardPreferences.rightColumnPortletNames, 2);
portal.addPortletsFromString(".dashContent.addContent.wide", 2);
session.setAttribute(Constants.USERS_SES_PORTAL, portal);
}
request.setAttribute(Constants.PORTAL_KEY, portal);