Author: liem_nguyen
Date: 2010-02-25 02:39:51 -0500 (Thu, 25 Feb 2010)
New Revision: 1858
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java
Log:
GTNPORTAL-703 When passwords aren't equals when we change it, Gatein return an
"Info" Box
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2010-02-25
07:38:37 UTC (rev 1857)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2010-02-25
07:39:51 UTC (rev 1858)
@@ -114,7 +114,7 @@
String oldEmail = user.getEmail();
if (user == null)
{
- uiApp.addMessage(new
ApplicationMessage("UIAccountInputSet.msg.user-is-deleted", null));
+ uiApp.addMessage(new
ApplicationMessage("UIAccountInputSet.msg.user-is-deleted", null,
ApplicationMessage.WARNING));
UIUserInfo userInfo = getParent();
if (userInfo != null)
{
@@ -137,7 +137,7 @@
String pass2x = getUIStringInput(PASSWORD2X).getValue();
if (!pass1x.equals(pass2x))
{
- uiApp.addMessage(new
ApplicationMessage("UIAccountForm.msg.password-is-not-match", null));
+ uiApp.addMessage(new
ApplicationMessage("UIAccountForm.msg.password-is-not-match", null,
ApplicationMessage.WARNING));
return false;
}
user.setPassword(pass1x);
@@ -153,7 +153,7 @@
user.setEmail(oldEmail);
query.setEmail(oldEmail);
Object[] args = {username};
- uiApp.addMessage(new
ApplicationMessage("UIAccountInputSet.msg.email-exist", args));
+ uiApp.addMessage(new
ApplicationMessage("UIAccountInputSet.msg.email-exist", args,
ApplicationMessage.WARNING));
return false;
}
service.getUserHandler().saveUser(user, true);
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java
===================================================================
---
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java 2010-02-25
07:38:37 UTC (rev 1857)
+++
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java 2010-02-25
07:39:51 UTC (rev 1858)
@@ -19,13 +19,13 @@
package org.exoplatform.webui.organization;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.portal.pom.config.Utils;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.Query;
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.form.UIFormInputWithActions;
import org.exoplatform.webui.form.UIFormStringInput;
@@ -103,7 +103,7 @@
String pass2x = getUIStringInput(PASSWORD2X).getValue();
if (!pass1x.equals(pass2x))
{
- uiApp.addMessage(new
ApplicationMessage("UIAccountForm.msg.password-is-not-match", null));
+ uiApp.addMessage(new
ApplicationMessage("UIAccountForm.msg.password-is-not-match", null,
ApplicationMessage.ERROR));
return false;
}
String username = getUIStringInput(USERNAME).getValue();
@@ -115,7 +115,7 @@
if (service.getUserHandler().findUserByName(user.getUserName()) != null)
{
Object[] args = {user.getUserName()};
- uiApp.addMessage(new
ApplicationMessage("UIAccountInputSet.msg.user-exist", args));
+ uiApp.addMessage(new
ApplicationMessage("UIAccountInputSet.msg.user-exist", args,
ApplicationMessage.ERROR));
return false;
}
@@ -124,7 +124,7 @@
if (service.getUserHandler().findUsers(query).getAll().size() > 0)
{
Object[] args = {user.getUserName()};
- uiApp.addMessage(new
ApplicationMessage("UIAccountInputSet.msg.email-exist", args));
+ uiApp.addMessage(new
ApplicationMessage("UIAccountInputSet.msg.email-exist", args,
ApplicationMessage.ERROR));
return false;
}
Show replies by date