request.getSession().setAttribute(Globals.AUTHENTICATOR_KEY, new Authenticator(user));
request.getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY, user.getLocale());
request.getSession().setAttribute(Globals.CONFIGURATION_KEY, new UserConfiguration(user));
MenuFactory menuFactory = (MenuFactory)request.getSession().getServletContext().getAttribute(Globals.MENU_FACTORY_KEY);
Menu menu = menuFactory.getCustomizedMenu(AuthenticatorUtility.getAuthenticator(request));
request.getSession().setAttribute(Globals.MENU_KEY, menu);
forward = LOGIN_OK;
}
}
if (!errors.isEmpty())
saveErrors(request, errors);
if (forward == LOGIN_OK) {
Menu menu = (Menu) request.getSession().getAttribute(Globals.MENU_KEY);
if(form.getDeeplink() != null) {
MenuItem item = null;
if(log.isDebugEnabled())
log.debug("execute deeplink");
if("EVENT".equals(form.getDeeplink())) {
if(log.isDebugEnabled()) {
log.debug("prepare deeplink to event with id: "+form.getId());
}
item = menu.findItem("/calendar/showMainCalendar");
} else if("JOB".equals(form.getDeeplink())) {
if(log.isDebugEnabled()) {
log.debug("prepare deeplink to job with id: "+form.getId());
}
item = menu.findItem("/home/jobs");
}
if(item != null) {
if(log.isDebugEnabled())
log.debug("active menu item with id: "+item.getId());
menu.activate(item.getId());
}
}
return new ActionForward(getActionURL(request, menu.getActiveItem().getAction()));
} else {
return mapping.getInputForward();
}
}