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
This commit is contained in:
Gavin Cornwell
2008-10-06 20:25:42 +00:00
parent 09c1c23776
commit 12be7dc6f2
2 changed files with 4 additions and 4 deletions

View File

@@ -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