From 12be7dc6f208fc77fde67ac56988371ee16197a3 Mon Sep 17 00:00:00 2001 From: Gavin Cornwell Date: Mon, 6 Oct 2008 20:25:42 +0000 Subject: [PATCH] Merged V2.1 to HEAD 10345: Fix for ETWOONE-89: Unfriendly error notification appears git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11220 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/messages/webclient.properties | 1 + .../alfresco/web/bean/users/ChangeMyPasswordDialog.java | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index ff05789701..080c1eecc9 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -1589,6 +1589,7 @@ change_my_password_description=Use this view to change your password change_my_password_instructions=Enter your new password. old_password=Old Password new_password=New Password +error_incorrect_old_password=The 'Old Password' you entered was incorrect. edit_user_details=Edit User Profile edit_user_details_description=Use this view to change your user details and email address start_location=Start Location diff --git a/source/java/org/alfresco/web/bean/users/ChangeMyPasswordDialog.java b/source/java/org/alfresco/web/bean/users/ChangeMyPasswordDialog.java index bccf09fb7b..66c0811b48 100644 --- a/source/java/org/alfresco/web/bean/users/ChangeMyPasswordDialog.java +++ b/source/java/org/alfresco/web/bean/users/ChangeMyPasswordDialog.java @@ -24,13 +24,10 @@ */ package org.alfresco.web.bean.users; -import java.text.MessageFormat; - import javax.faces.context.FacesContext; import org.alfresco.model.ContentModel; import org.alfresco.web.app.Application; -import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; public class ChangeMyPasswordDialog extends UsersDialog @@ -39,6 +36,7 @@ public class ChangeMyPasswordDialog extends UsersDialog private static final long serialVersionUID = 1965846039555088108L; private static final String MSG_FINISH_BUTTON = "finish_button"; + private static final String MSG_ERROR_INCORRECT_OLD_PASSWORD = "error_incorrect_old_password"; @Override protected String finishImpl(FacesContext context, String outcome) throws Exception @@ -78,7 +76,8 @@ public class ChangeMyPasswordDialog extends UsersDialog catch (Exception e) { outcome = null; - Utils.addErrorMessage(MessageFormat.format(Application.getMessage(newContext, Repository.ERROR_GENERIC), e.getMessage()), e); + Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(), + MSG_ERROR_INCORRECT_OLD_PASSWORD)); } } else