try {
// execute the password change,
// set success massage and navigation outcome
IdentityAdapter idAdapter = context.newIdentityAdapter();
idAdapter.changePassword(context.getUser(),getChangePasswordCriteria());
msgBroker.addSuccessMessage("identity.changePassword.success");
setNavigationOutcome(ResourceKeys.NAVIGATIONOUTCOME_HOME_DIRECT);
} catch (CredentialsDeniedException e) {
msgBroker.addErrorMessage("identity.changePassword.err.old");