roles = copy;
saveMessage(request, "availableRoles.match.limited", maxRoleResults);
}
} catch (Exception e) {
log.error("Failed to get available roles.", e);
ActionMessages errs = new ActionMessages();
errs.add(Globals.ERROR_KEY, new ActionMessage("availableRoles.cannotListRoles", Util.getExceptionMessageChain(e)));
saveErrors(request, errs);
roles = new Role[0];
}
showAvailableRolesForm.initialize(roles, request.getSession());
ActionMessages msgs = new ActionMessages();
if (!userDatabase.supportsAccountCreation()) {
msgs.add(Globals.MESSAGE_KEY, new ActionMessage("availableRoles.noRoleCreation.text"));
}
if (msgs.size() > 0) {
saveMessages(request, msgs);
}
} catch (Exception ex) {
log.error("Failed to reset administration form", ex);
}