Author: phuong_vu
Date: 2010-06-08 06:21:22 -0400 (Tue, 08 Jun 2010)
New Revision: 3248
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupMembershipForm.java
Log:
GTNPORTAL-1290 Allow to add user into group in case after comma has space
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupMembershipForm.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupMembershipForm.java 2010-06-08
09:55:45 UTC (rev 3247)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupMembershipForm.java 2010-06-08
10:21:22 UTC (rev 3248)
@@ -77,7 +77,7 @@
public UIGroupMembershipForm() throws Exception
{
addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME,
null).addValidator(MandatoryValidator.class)
- .addValidator(ExpressionValidator.class,
"^\\p{L}[\\p{L}\\d._\\-,]+$",
+ .addValidator(ExpressionValidator.class,
"^\\p{L}[\\p{L}\\d._\\-\\s*,\\s*]+$",
"UIGroupMembershipForm.msg.Invalid-char"));
addUIFormInput(new UIFormSelectBox("membership", "membership",
listOption).setSize(1));
UIPopupWindow searchUserPopup = addChild(UIPopupWindow.class,
"SearchUser", "SearchUser");
@@ -191,7 +191,7 @@
OrganizationService service =
uiForm.getApplicationComponent(OrganizationService.class);
MembershipHandler memberShipHandler = service.getMembershipHandler();
UIApplication uiApp = event.getRequestContext().getUIApplication();
- List<String> userNames =
Arrays.asList(uiForm.getUserName().split(","));
+ List<String> userNames =
Arrays.asList(uiForm.getUserName().trim().split("\\s*,\\s*"));
Group group = userInGroup.getSelectedGroup();
MembershipType membershipType =
service.getMembershipTypeHandler().findMembershipType(uiForm.getMembership());
if (group == null)
Show replies by date