Author: phuong_vu
Date: 2010-11-17 06:56:55 -0500 (Wed, 17 Nov 2010)
New Revision: 5141
Modified:
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
Log:
EXOGTN-90 Kept old search result when search user with wrong path
Modified:
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
===================================================================
---
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-17
11:40:05 UTC (rev 5140)
+++
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-17
11:56:55 UTC (rev 5141)
@@ -386,7 +386,9 @@
uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service =
uiSelectGroupForm.getApplicationComponent(OrganizationService.class);
PageList users =
uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ users.setPageSize(10);
uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
@@ -397,17 +399,23 @@
{
UIUserSelector uiSelectUserForm = event.getSource();
String groupId = uiSelectUserForm.getSelectedGroup();
- uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service =
uiSelectUserForm.getApplicationComponent(OrganizationService.class);
+
+ PageList users = PageList.EMPTY_LIST;
if (groupId != null && groupId.trim().length() != 0)
{
- PageList users =
uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
- uiSelectUserForm.uiIterator_.setPageList(users);
+ if (service.getGroupHandler().findGroupById(groupId) != null)
+ {
+ users =
uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ }
}
else
{
-
uiSelectUserForm.uiIterator_.setPageList(service.getUserHandler().findUsers(new
Query()));
+ users = service.getUserHandler().findUsers(new Query());
}
+ users.setPageSize(10);
+ uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}