Hi all
We have 2 things that we need to share with the Client and Server. I did that with Shared Variables.
But the problem now is they wont load on the ClientSession anymore and therefore it fails when i want to log in.
This is the ClientSession Code
@Override
protected void execLoadSession() {
// initialize variables from server session to prevent crash while loading client session(this
// is needed bc theres more than 1 shared variable in context)
initializeSharedVariables();
// pre-load all known code types
CODES.getAllCodeTypes("SHARED PACKAGE");
// The locale needs to be set before the Desktop is created.
String localeString =
ClientUIPreferences.getClientPreferences(get()).get(PREF_USER_LOCALE, null);
if (localeString != null) {
setLocale(Locale.forLanguageTag(localeString));
}
LOG.info("created a new Client session for {}", getUserId());
LOG.info("CLIENT EMPLOYEE ID IS {}", getSessionUser());
LOG.info("CLIENT EMPLOYEE ROLES ARE {}", getEmployeeSessionRoles());
ISettingsPageService service = BEANS.get(ISettingsPageService.class);
Boolean dense = service.getViewSetting(getSessionUser().getEmployeeId());
// false == light
Boolean view = service.getThemeSetting(getSessionUser().getEmployeeId());
setDesktop(getDesktopForUserRoles(dense, view));
service.updateEmployeeLoggin(getSessionUser().getEmployeeId());
}
The LOGS of the Clientsession all say the shared Variables are null. Therefore my service fail too :/
This the Serversession Code
@Override
protected void execLoadSession() {
UserPojo user = loadEmployeeSessionId(getUserId());
setSessionUser(user);
List<Roles> employeeRoles = loadEmployeeRoles(user.getEmployeeId());
setEmployeeSessionRoles(employeeRoles);
LOG.info("USER IS: " + user);
LOG.info("created a new server session for {}", getUserId());
LOG.info("SERVER EMPLOYEE ID IS {}", getSessionUser().getEmployeeId());
LOG.info("SERVER EMPLOYEE ROLES ARE {}", getEmployeeSessionRoles());
}
Did something change in Scout 11? This worked before. Does anyone know a fix?
Thanks in advance :)